Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    Hello,

    I downloaded the Maps API (0.5 from the Wiki) and would like to add it to my project.
    I've done this in Netbeans via Project Properties > Build > Libraries and Resources and there adding the nma.jar. But it doesn't work as it shows me this when compiling:

    E:\GemeinsameDateien\VRSFahrplan\Tankometer\src\Main.java:7: package com.nokia.maps does not exist
    import com.nokia.maps.*;
    1 error
    Is there anything else I need to do to be able to use the API?

    Best Regards,
    Sebastian

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    Basically the Add Jar/zip option would be the only thing you need to do, all and all I would suggest you would try the 1.0 version, it available now at: http://www.developer.nokia.com/info/...3e/JavaME.html

  3. #3
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    thanks for reply

    I used now the new version of the Maps API, but I still get the same error when compiling...
    Also when adding "import com.nokia.maps.*;" into the source code in Netbeans it shows the message, that the package doesn't exist...

    (if it should be important, I'm using Netbeans 6.9.1 with Symbian Belle SDK v0.6 on Windows XP SP3)

    would be happy about every idea

  4. #4
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    Can you run it in the simulator ? I'm now on my home computer, and to check the java environment, I would need to use my office computer, which I could only check tomorrow morning.

  5. #5
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    I'm working in VirtualBox, because of what I'm not able to run the emulator (see here: http://www.developer.nokia.com/Commu...ice-quot-error)...

    so I can't give you an answer to that... :/

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    maybe you could simply select the Nokia SDK 1.0 for Java option, i.e. run it in the simulator. For device you could see whether the ticking all optional packages would help. Gotta admit that I have not tried running any java apps on Symbian emulators.

  7. #7
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    running J2ME app in the Symbian Belle emulator works very well, as I'm using it on my desktop PC with Windows 7...

    I don't think that this is the problem why it doesn't find the package...

  8. #8
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    Anyhow, as said you could always try the SDK simulator or real device, those I have also used, so they should work just fine.

  9. #9
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    you're right, but it's not possible to use any simulator or real device, if I'm not able to compile the app because of the non-existing package com.nokia.maps...

  10. #10
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    So just to make sure, you did this:
    1. right click teh project, and click Properties from the pop-up menu
    2. select Libraries & resources
    3. Click Add jar/Zip
    4. Browse to find the nma.jar file and click Open,
    5. See that it is added to the list
    6. click Ok

    Then you should be able to build & run it.

  11. #11
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    yes, that's what I've done, see here:

  12. #12
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    looks pretty much ok to me, anyway can you try the helloworld examples from our wiki: http://www.developer.nokia.com/Commu...PI_for_Java_ME

  13. #13
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    hm, that's interesting: the example from the wiki works without any problem...

    so I tried something and pasted the import task from the example into my project source file, and it also worked...

    so why does this work:
    import com.nokia.maps.map.MapCanvas;
    import com.nokia.maps.common.*;

    and this not:
    import com.nokia.maps.*;

    ?

  14. #14
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    Preverifying 221 file(s) into E:\GemeinsameDateien\VRSFahrplan\Tankometer\build\preverified directory.
    Error preverifying class x
    java/lang/NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
    E:\GemeinsameDateien\VRSFahrplan\Tankometer\nbproject\build-impl.xml:470: Preverification failed with error code 1.
    ERSTELLEN FEHLGESCHLAGEN (Gesamtzeit: 3 Minuten 20 Sekunden)
    this is the error when trying to compile it with Symbian Belle SDK...
    when I compile it with Symbian 3 SDK everything works fine...

  15. #15
    Nokia Developer Moderator jasfox's Avatar
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    240
    It looks like your set-up is failing to find the SAX Parser on the classpath. Here are a few things you could try:
    1) Try adding the Web-services optional package jsr172 to your project.
    2) I guess you don't have this problem if you don't obfuscate. but you could reduce the obfuscation level
    3) add -libraryjars \path_to_my_SDK\jsr172.jar in the additional obfuscation settings.
    Jason Fox
    Technical Support Engineer, Maps Platform
    Location & Commerce

    http://developer.here.net/

Page 1 of 2 12 LastLast

Similar Threads

  1. How can I convert easily from Visual Studio 2008 project to Symbian project?
    By K.John in forum Series 40 & S60 Platform Feedback Archive
    Replies: 2
    Last Post: 2009-08-17, 14:01
  2. How to link a C++ project and symbian OS project in carbide??
    By Adrian99420 in forum Symbian User Interface
    Replies: 0
    Last Post: 2008-02-29, 03:29
  3. Project Manager with UI Project Experience
    By mattsankey in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-30, 09:33
  4. Project Managers with Symbian Project Experience
    By mattsankey in forum Symbian C++
    Replies: 0
    Last Post: 2004-06-30, 09:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved