How to run Midlets from Eclipse

T

Tim Tyler

I found out how to run midlets in Eclipse under windows.

Other folk seem to:

* Use the WTK KToolbar, or:
* Use WSDD.

The trick is much the same as the one used for the MS JVM:

You set up a second "Installed JRE" - using the preferences - and have it
point to an installed JRE.

Then in the "bin" directory of that you make a batch file - called:

midp_emulator.bat

This contains one line:

C:\Program1\Java\WTK20\bin\emulator %6 %7 %8

Then you use a run configuration, set it to use the new JRE,
use these as your "Program arguments":

-classpath C:\Docs\Java\xyz.jar -Xdescriptor:C:\Docs\Java\xyz.jad

....and...

"midp_emulator.bat"

....as your Java executable. The "Main class" can be set to anything.

That's all.

This is a bit of a rigmarole - Eclipse appears to be to blame for that.

However the end result is midlets can be launched like any other project.
 
T

Tim Tyler

: Tim Tyler wrote:

:> However the end result is midlets can be launched like any other project.

: Can you debug them?

I haven't tried that.

Both the emulator and the "bin/midp" executable apparently support
debugging via a port - so it might well be possible.

I expect I will be happy enough with "log-based debugging" for some time.
 
T

Tim Tyler

: : Tim Tyler wrote:

: :> However the end result is midlets can be launched like any other project.

: : Can you debug them?

: I haven't tried that.

: Both the emulator and the "bin/midp" executable apparently support
: debugging via a port - so it might well be possible.

Reputedly there is an Eclipse problem which prevents it from working
very well:

``Bugzilla Bug 30816 - Cannot debug to breakpoint with Wireless Toolkit''

https://bugs.eclipse.org/bugs/show_bug.cgi?id=30816
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top