BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   Blackberry Location.getBearing NoClassDefFound (

hdehaan 06-18-2012 08:42 AM

Blackberry Location.getBearing NoClassDefFound
I have a Blackberry 9800 V6.0.0.668.
and Eclipse with Blackberry jdk 7.0

I developed GPS software which includes:
public class LocationListenerImpl implements LocationListener

It all works fine.
But as soon as I include the statements:

double d = LocationInfo.getBearing(lat, lon, nl, ew);
All argument are of type double.

and in the application class

_locationProvider.setLocationListener(new LocationListenerImpl(_screen), 2, -1, -1);
catch (NoClassDefFoundError e)

I get the NoClassDefFound exception.
In the constructor I have


which doesn't provide this exception.

So, the getBearing call is causing the problem.

Can somebody help me, please?

Dougsg38p 06-18-2012 09:24 AM

Re: Blackberry Location.getBearing NoClassDefFound
You cannot compile under V7 and deploy under OS 6.

Your compiler must be <= the target OS level.

hdehaan 06-18-2012 09:53 AM

Re: Blackberry Location.getBearing NoClassDefFound
Thank you.
Indeed setting the JDK to 6, and the getBearing is not supported.
Do you have any idea how I can implement the getBearing functionality?

Dubdub 06-18-2012 11:12 AM

Re: Blackberry Location.getBearing NoClassDefFound
Please do not double post.

All times are GMT -5. The time now is 09:07 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.