Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EclipseME - debug midlet with Emulator

 
Victor Ho
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am a little new to Eclipse (more used to IDEA). I am having a problem running debugger on Midlet within eclipse. (I can run emulator.exe fine with my code from WTK22)

I have installed the EclipseME plugin and have linked up with my WTK22. When emulator runs within eclipse, it complains:

Connecting to 127.0.0.1 on port 2800
Waiting for debugger on port 2797
Waiting for KVM...
Running with storage root DefaultColorPhone
Connected to KVM
Connection received.
java.lang.ClassNotFoundException: com/hello/MyMidlet
at com.sun.midp.midlet.MIDletState.createMIDlet(+14)
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.
650796 bytecodes executed

Ques:
- Am I missing smth in the project classpath (buildpath in eclipse term)?
- But I am able to compile/build fine within the project, so I am not sure what can be missing in build path.
- Since emulator.exe in WTK22 allows you to run with jdwp listening on a debug port, anyone knows how to use eclipse to remote debug a running emulator instance?

Thanks a lot. Help on any of one of my questions would be great.

Victor
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Victor,

Try to open the "Run" window and take a look at the properties for
your project. Check that what you entered in Executable: Midlet
textfield is consistent with your project.

I guess you'll find com/hello/MyMidlet there, and your class/project
structure isn't the above.

/Svend Rost
 
Victor Ho
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

I still don't get what's the problem. I have com.hello.MyMidlet for "Executable -> Midlet:".

I ended up specifying the explicit classpath by using -cp in the "Extra Emulator Parameters" under the Emulation tab. This workaround is working for me.

Victor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic