HelloWorld => java.lang.ClassNotFoundException

17 messages - 3217 views

I had the same issue as oldshoe running the HelloWorld demo from the site.  I tried switching the JRE as SyRenity (tried js2dk 1.4.2_19 as EclipseME recommends), but without success.  Moved to Eclipse 3.3.2 with the same EclipseMe and Sun WTK and had no problem.  Not a problem for me to use 3.3.2 (so far), but posting the details for anyone else having issues...

Problem came while running the following development:

Eclipse 3.4.1

EclipseMe 1.7.9

Sun WTK 2.5.2_01

Console Output:

Running with storage root C:\...\DefaultColorPhone
Running with locale: English_United States.1252
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: org/kalmeo/tutorial/HelloWorld
    at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
    at com.sun.midp.midlet.Scheduler.schedule(+52)
    at com.sun.midp.main.Main.runLocalClass(+28)
    at com.sun.midp.main.Main.main(+80)
Execution completed.
3335802 bytecodes executed
19 thread switches
1667 classes in the system (including system classes)
17251 dynamic objects allocated (514636 bytes)
1 garbage collections (0 bytes collected)

Hi,

      I am facing similar problem.

Hi,
      I am new bie to J2ME and EclipseME .

I have added third party jar file (floggy-persistance-framework.jar) in the buildpath and then I exported in  properties > order and export tab . I have added it in verified>libs folder also. I am sure the third party jar is added to my classpath.(because it is not showing any compile time errors)

Now it is showing the following error. I think EclipseME not able to find my midlet because of classpath settings problem (after adding and exporting third party jar file). Please help me. I was trying to solve this problem from last 3 days.

Running with storage root C:\Users\srikanthnagachandm\j2mewtk\2.5.2\appdb\DefaultColorPhone
Running with locale: English_United States.1252
Running in the unidentified_third_party security domain
java.lang.ClassNotFoundException: ExampleFloggy
   at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
   at com.sun.midp.midlet.Scheduler.schedule(+52)
   at com.sun.midp.main.Main.runLocalClass(+28)
   at com.sun.midp.main.Main.main(+80)
Execution completed.
3349083 bytecodes executed
17 thread switches
1667 classes in the system (including system classes)
17251 dynamic objects allocated (514224 bytes)
1 garbage collections (0 bytes collected)


environment I am using :
sun WTK 2.5.2
CLDC - 1.1
MIDP - 2.0

Eclipse - 3.5.2 (with eclipseME plugin)


Is there anywhere  need to provide command line arguments to include classpath ? (because without adding third party jar, my midlet is working fine). In some forum, I found I have to add command prompt like the below line
midp -classpath . -Xdescriptor stock.jad
But, I don't know where to confiuge this line in Eclipse also. 

Kindly provide your suggestions.