On Fri, 01 Apr 2005 21:47:10 +0100, Roland <>
wrote:
> Hello
>
> I am trying to find out the good provider for a kind of GPS program
> written with j2me midp 2.0 using the location API (lapi.jar) and
> Eclipse development environment with the plugin 'eclipseME'.
>
> I have a very strange phenomena.
> I try to create an instance of the Criteria class which is part of the
> Location API (lapi.jar).
>
> I can compile it without any problems, the program crashes at runtime.
> My programm crashes with the following error line:
> java.lang.NoClassDefFoundError: javax/microedition/location/Criteria
> The lapi.jar is included in the project and the Criteria class exists.
>
Looks like a classpath problem, is the lapi.jar included in the classpath
when you run your app? Are you running on an emulator or an actual
device? You need to configure your emulator or the manifest in your app's
jar file to include lapi.jar in the classapth.
OK, that's my token attempt to answer your question

the real reason I
replied is because I'm interested in which device(s) are you planning to
run on? We've been looking at JSR-179 (the J2ME location API) and it
seems to be almost universally unsupported by current generation mobile
phones. It seems to require both CDLC 1.1 for floating point support and
vendor support for the location API on the device (I may be wrong, my
colleagues have looked at this in more detail than I have personally). I
presume you are using some kind of reference implementation in an
emulator? We are targeting Symbian devices and are having to use C++ to
retrieve location information because of the lack of JSR-179 support. I'd
be very interested if you've got it working just with Java.
Dan.
P.S. Anybody else think there should be a comp.lang.java.mobile group?
--
Daniel Dyer
http://www.footballpredictions.net