Including a jar file in a MIDlet package?

Discussion in 'Java' started by Simon Brooke, Nov 5, 2006.

  1. Simon Brooke

    Simon Brooke Guest

    This may well be another very stupid question. I'm building something which
    uses the Location API (JSR 179), and which will be delivered to devices
    which don't provide the location API natively. So I either need to include
    the class files from lapi.jar into my midlet package, or find some other
    way of making lapi.jar available on the device. I've implemented a
    sub-class of LocationProvider which /should/ communicate with the GPS
    module built into the device (but which I can't yet debug, because of not
    being able to get the location API onto the device).

    I also need to make lapi.jar available to the emulator (Sun Java Wireless
    Toolkit 2.2), because currently it's giving me:

    Running with storage root DefaultColorPhone
    java.lang.NoClassDefFoundError:
    javax/microedition/location/LocationException
    at uk.co.weft.fisherman.fieldkit.midlet.FieldKitMidlet.<init>(+365)
    at java.lang.Class.runCustomCode(+0)
    at com.sun.midp.midlet.MIDletState.createMIDlet(+19)
    at com.sun.midp.midlet.Scheduler.schedule(+52)
    at com.sun.midp.main.Main.runLocalClass(+28)
    at com.sun.midp.main.Main.main(+116)
    Execution completed.

    Any suggestions as to how I do this?

    I'm currently using EclipseME 1.5.5 to do my development/testing, so a
    solution compatible with this would be very nice; but frankly any solution
    would be good!

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/

    See one nuclear war, you've seen them all.
     
    Simon Brooke, Nov 5, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. harry
    Replies:
    1
    Views:
    491
    Sudsy
    Nov 22, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    587
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,731
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,773
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    670
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page