Including a jar file in a MIDlet package?

S

Simon Brooke

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top