954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

java.lang.NoClassDefFoundError

Hi all.

I have a problem when I am trying to run an application on my mobile.
The app compiles on netbeans, but when I copies it to my mobile telephone, it sais:
java.lang.NoClassDefFoundError. I have been told that I should have references to everything and that i might need to run it with java -jar projectname.jar. Can anyone tell me how to change this or what could be wrong.

Kind regards. Michael

Dancealot
Light Poster
25 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

Can you post copy/attach your project? I can have look at it for you...

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Hi Peter. This is the project. It should almost be identical to the one i downloaded from IBM. Thanks in advance.

http://rapidshare.com/files/137256309/btevents.zip.html

Dancealot
Light Poster
25 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

The file provided by you worked for me without any problems on Sony Ericsson w910 and also under emulator on my laptop. Unfortunately I can not confirm connection between these two as my laptop BT sometimes have the mind on its own. On what device you trying to deploy this file?

PS: The example has one big problem, no Exit command ;)

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

That was strange. I am trying to make it work on a htc touch diamond. Just to make sure. All you did was unpack the folder, and then copy it to the mobile. what file did you execute the program with (JAD or JAR file). I am sorry if this is a stupid question, but I am very new to java programming :(
thanks in advance. Michael

Dancealot
Light Poster
25 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

HTC is big unknown in Java mobile development. Looking on their website in the device specification I did not find any note on JVM being present on device.
I came across some forums that maybe able to help you htcwizardweb.net and forum.xda-developers.com . You need to either ask them or browse forums for appropriate J2ME development and deployment on these devices.
I'm sorry that I'm not able to help you in this...

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

Thx a lot mate. I will try to look at those forums. thanks for looking at the code for me, really appriciate it.

Dancealot
Light Poster
25 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You