Debugging in JavaMe (Midlet or JAD)

1.9k views Asked by At

I can debug my application as "Emulated Java Me Midlet" or as "Emulated Java Me Jad". What is the difference between those types? Right now my app is only working in debug as emulated java me jad.

When I run it as midlet I get the following error:

Cannot create PortForwarder with necessary parameters: Failed to get device id for "null"! Syntax:

emulator [arguments]

In order to get commands supported by given device run: emulator.exe -Xdevice: -Xquery

Does someone know how to solve this?

2

There are 2 answers

2
Eric Giguere On

JAD = Java Application Descriptor. JADs are used for over-the-air (OTA) deployment. A JAD specifies one or more MIDlets to install on a device.

You've probably not configured the MIDlet deployment option correctly for the emulator. Read through the docs here.

0
vaughandroid On

The "null" device ID suggests that there probably is a configuration issue at play here. I'd suggest checking Debug Configurations->Emulation tab and checking that all's well there.

It's also possible that this you've encountered this known issue: https://blogs.oracle.com/javamesdk/entry/eclipse_java_me_sdk_issue:

If you have had issues with running your MIDlet in Eclipse + MTJ (Eclipse ME), then this article is relevant to you.

We found out that "Run as emulated MIDlet" option is not supported by Java ME SDK 3.0.5. "Run as emulated MIDlet" means that you are executing a specific MIDlet in the jar file, where jar file contains more than one MIDlet.

Please use "Run as emulated Java ME JAD" option instead...