×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    8

    Install LAPI in Netbeans

    Hi.
    How I install the Location API inside the IDE NetBeans 4.1 to be able to develop applications that agrees the sentence "import javax.microedition.location" ?
    That I file I need to download and how I install it?

    Note: LAPi (Location API) based in JSR-179 for developer applications using GPS on an Nokia cellular.

    Thanks.
    Henry

    PD: sorry my english.

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Install LAPI in Netbeans

    Hi Henry,

    No problem about English. I advise you to download Nokia Prototype SDK 4.0 and get the location API jar from it - just install it and check this location C:\Nokia\Devices\Nokia_Prototype_SDK_4_0\lib\ext for example.

    Just look for the location.zip file, rename it to location.jar. Just add the JAR file to your project's classpath on NetBeans in order to import this namespace.

    or you can try to get it here - http://www.forum.nokia.com/main/1,,1...00.html#jsr179

    NetBeans is a good IDE but you can try Eclipse + Carbide.j + Nokia Prototype SDK 4.0 as well.

    Carbide.j
    http://www.forum.nokia.com/main/0,,034-2,00.html

    NPSDK 4.0
    http://www.forum.nokia.com/main/0,,034-761,00.html

    Hope it helps!

    BR,

    Juarez Junior

  3. #3
    Regular Contributor
    Join Date
    May 2003
    Posts
    58

    Re: Install LAPI in Netbeans

    The advise you to download Nokia Prototype SDK 4.0 is good but you don't need to do anything with the jar file - simply add the SDK using Tools | Java Platform Manager and change project properties to use it. LAPI is also available in J2ME Wireless Toolkit 2.3 Beta.
    I'd recommend to update to NetBeans 5.0 - it can download and install latest Sun SDKs automatically.

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    8

    Re: Install LAPI in Netbeans

    OK. Thanks for ours comments.
    But I have other question, for the case of J2ME Wireless Toolkit 2.3 Beta, I have download it, but how it install for replace the version 2.2 that come by default in Netbeans MP 4.1?

    Henry

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Install LAPI in Netbeans

    Hi mryzl,

    "The advise you to download Nokia Prototype SDK 4.0 is good but you don't need to do anything with the jar file"
    Yep, maybe you're right but the original question was about NetBeans 4.1, i'm not sure if Location API would be available...it will depend on the SDK version that's integrated on NB (WTK, etc).

    I think that my reply was somehow complete, at least

    BR,

    Juarez Junior
    Last edited by juarezjunior; 2006-06-08 at 21:47.

  6. #6
    Regular Contributor
    Join Date
    May 2003
    Posts
    58

    Re: Install LAPI in Netbeans

    NB 4.1 works with newer versions of SDKs like WTK or Nokia. Just install the SDK and point the IDE to the installation using Tools | Java Platform Manager.
    In general, it is not a good idea to take an API jar from one SDK and use it with another SDK since it may depend on other classes of the SDK and although you may be able to compile applications against it, you won't be able to run them.
    So technically your response was correct (how to add a jar file) but I don't recommend to add jar files with runtime classes (==classes that are usually installed on the devices).

    Quote Originally Posted by juarezjunior
    Hi mryzl,

    "The advise you to download Nokia Prototype SDK 4.0 is good but you don't need to do anything with the jar file"
    Yep, maybe you're right but the original question was about NetBeans 4.1, i'm not sure if Location API would be available...it will depend on the SDK version that's integrated on NB (WTK, etc).

    I think that my reply was somehow complete, at least

    BR,

    Juarez Junior

  7. #7
    Regular Contributor
    Join Date
    May 2003
    Posts
    58

    Re: Install LAPI in Netbeans

    Quote Originally Posted by chantybond
    OK. Thanks for ours comments.
    But I have other question, for the case of J2ME Wireless Toolkit 2.3 Beta, I have download it, but how it install for replace the version 2.2 that come by default in Netbeans MP 4.1?

    Henry
    Just install the new version, then you can switch between old 2.2 and 2.3 easily, see this article:
    http://developers.sun.com/prodtech/j...emulators.html
    or 'Changing Emulators' here:
    http://www.netbeans.org/kb/50/quickstart-mobility.html

  8. #8
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Install LAPI in Netbeans

    Hi Hi mryzl,

    It was all about setting a Java classpath, i do understand that when you're using NetBeans or Eclipse + Carbide.j and you create a project, the libraries are included as needed...but there are some situations where you might need to add JAR files yourself...

    "In general, it is not a good idea to take an API jar from one SDK and use it with another SDK since it may depend on other classes of the SDK and although you may be able to compile applications against it, you won't be able to run them."

    I cannot see that happening in Java, maybe i'm overlooking something. AFAIK I doubt that the Location API would depend on any other Optional Pack. It does depend on CLDC 1.1, see the spec.

    "The Location API for J2ME is designed as an Optional Package that can be used with many J2ME Profiles. The minimum platform required by this API is the J2ME Connected, Limited Device Configuration (CLDC) v1.1. The API can also be used with the J2ME Connected Device Configuration (CDC). (Note that due to using the floating point datatypes in this API, it can’t be used with CLDC v1.0.)"

    I hope Henry solved his problems, though

    BR,

    Juarez Junior
    Last edited by juarezjunior; 2006-06-09 at 14:04.

  9. #9
    Regular Contributor
    Join Date
    May 2003
    Posts
    58

    Re: Install LAPI in Netbeans

    As I've said before, you'll probably be able to compile your applications against such jar files but you won't be able to run them in the emulator. Take for instance Location API -
    LocationProvider is an abstract class whose getInstance() method is supposed to return an implementation. The implementation is SDK/device specific and may require additional classes/native code of the SDK/device. If you are lucky, the jar file will contain all the functionality, if not you'll get NPE or ClassNotFoundException.
    Thus I recommend to download latest verion of SDK with all necessary APIs.


    Quote Originally Posted by juarezjunior
    Hi Hi mryzl,

    It was all about setting a Java classpath, i do understand that when you're using NetBeans or Eclipse + Carbide.j and you create a project, the libraries are included as needed...but there are some situations where you might need to add JAR files yourself...

    "In general, it is not a good idea to take an API jar from one SDK and use it with another SDK since it may depend on other classes of the SDK and although you may be able to compile applications against it, you won't be able to run them."

    I cannot see that happening in Java, maybe i'm overlooking something. AFAIK I doubt that the Location API would depend on any other Optional Pack. It does depend on CLDC 1.1, see the spec.

    "The Location API for J2ME is designed as an Optional Package that can be used with many J2ME Profiles. The minimum platform required by this API is the J2ME Connected, Limited Device Configuration (CLDC) v1.1. The API can also be used with the J2ME Connected Device Configuration (CDC). (Note that due to using the floating point datatypes in this API, it can’t be used with CLDC v1.0.)"

    I hope Henry solved his problems, though

    BR,

    Juarez Junior

  10. #10
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Install LAPI in Netbeans

    Hi mryzl,

    As I've said before, you'll probably be able to compile your applications against such jar files but you won't be able to run them in the emulator. Take for instance Location API - LocationProvider is an abstract class whose getInstance() method is supposed to return an implementation. The implementation is SDK/device specific and may require additional classes/native code of the SDK/device.

    Now i figured out what you was talking about, you're right in this regard, no doubt. But you can copy a version of API from Nokia SDK/device dir and use it on your classpath, right? This is what i indicated before....

    "No problem about English. I advise you to download Nokia Prototype SDK 4.0 and get the location API jar from it - just install it and check this location C:\Nokia\Devices\Nokia_Prototype_SDK_4_0\lib\ext for example."

    I did overlook the implementaton link, ok.
    or you can try to get it here - http://www.forum.nokia.com/main/1,,...,00.html#jsr179

    Thanks for pointing that

    BR,

    Juarez Junior

Similar Threads

  1. integration Carbide.j 1.0 and Netbeans 5.0
    By ovjo12 in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-02-16, 07:48
  2. 3510 SDK - how to install on Netbeans 4.1
    By leopardo.f in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2005-10-11, 11:02
  3. install error in simulator
    By billqu in forum Symbian
    Replies: 4
    Last Post: 2004-10-29, 13:17
  4. NetBeans 4.1 Early Access Release Now Available
    By rdemmer in forum Mobile Java General
    Replies: 0
    Last Post: 2004-10-22, 14:52
  5. Replies: 0
    Last Post: 2004-08-25, 11:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×