Running/Debugging a MIDlet
This document describes how to run and debug your MIDlet using EclipseME's support for the wireless toolkits' emulator(s).
Before you begin
In order to properly debug a MIDlet, you must alter some of Eclipse's default settings. The setting changes required are covered in the installation instructions. Click here to see the changes you need to make.
Quickly debugging a MIDlet
In order to quickly debug a MIDlet, you can simply select Emulated J2ME Midlet from the Debug item.
This will automatically create a Launch Configuration entry using the current default settings, and invoke the debugger.
Alternately, you can use the "contextual launch" feature by right-clicking on your main MIDlet class and selecting Emulated J2ME Midlet from the Debug item.
When you use either of these options, the Launch Configuration is automatically set up for Midlet launching mode. See here for more details on the different launch modes.
Manually creating a Launch Configuration entry
You can manually create a Launch Configuration by selecting either the Run... or Debug... item, clicking on Wireless Toolkit Emulation in the left column and pressing the New button.
By default, the configuration is created for Over The Air debugging. See here for more details on the different launch modes.
Debugging the Emulator
As of Eclipse version 3.0, it is now possible to debug the KVM that is part of the J2ME emulator. The Emulated J2ME Midlet launch configuration may now be used to debug a MIDlet in the emulator.
NOTE: It is generally not possible to debug a MIDlet in Over the Air (OTA) mode.
Under normal circumstances, when you select a non-OTA launch, EclipseME attempts to run the emulator using the classes in the verified area, rather than performing a full deployment. Certain emulators will not operate in this mode, and require your project to be fully deployed. In addition, OTA launches also require a full deployment operation be performed.
EclipseME handles all these details automatically. However, as a result, if you have configured your MIDlet to be signed, the signature operation is part of the deployment process. As such, depending on your signature password settings, EclipseME may need to prompt you for the keystore and key passwords as part of doing the launch. This is most likely to happen the first time you attempt to launch when you have configured EclipseME to prompt for passwords. Thereafter, until you close Eclipse or change workspaces, EclipseME will store the passwords in memory, and thus will not have to re-prompt you.
For more details, see About MIDlet Suite Signing.
Copyright © 2005, http://www.eclipseme.org. All rights reserved.