|
|
|
|
Running a Java ME MIDlet
In this section, you will learn more about running Java ME
MIDlets in the workbench.
Using the "Run As" context menu item
- In the Package Explorer view, find the main MIDlet class and
double-click it to open it in the java editor.
- Right click on the main MIDlet class in the Package Explorer
and select Run As > Emulated Java ME MIDlet. The Run
As context menu item is also available in other places, such as the
Outline view and the Java editor.
- A configuration is automatically created to launch the MIDlet.
- The selected class will be launched using the Java ME SDK
device previously configured for use in the MIDlet project.
Using the Run button from the workbench toolbar
-
Click on the Run button from the workbench toolbar, which will
launch the currently selected resource or active editor.
-
If prompted, select the Emulated Java ME MIDlet
option.
- A configuration is automatically created to launch the MIDlet.
- The selected MIDlet will be launched using the Java ME SDK
device previously configured for use in the MIDlet project.
Through the Application Descriptor overview page
- In the Package Explorer view, find the Application Descriptor
file and double-click it to open it in the java editor.
- On the Running section, click on the Launch
as emulated Java ME MIDlet.
- A configuration is automatically created to launch the MIDlet.
- The selected MIDlet will be launched using the Java ME SDK
device previously configured for use in the MIDlet project.
Manually creating the configuration to launch a MIDlet
href="eclipse_java_me_javascript:executeCommand("org.eclipse.debug.ui.commands.OpenRunConfigurations")"> Run > Open Run Dialog... from the workbench menu bar. This opens a
dialog that lets you create, modify, and delete launch configurations
of different types.
- Select Wireless Toolkit Emulation in the left
hand list of launch configuration types, and press the New
button in the toolbar. This will create a new launch configuration for
your MIDlet Project. The tabs on the right hand side allow you
control specific aspects of the launch.
By default, the configuration is created using the Over
The Air option. See here for more
details on the different launch modes.
|
|
|