Running a MIDlet

Steps

  1. Right-click the project and select Run >Run Configurations to display the Run Configurations dialogue box.

    Note:

    You can also run the files using Emulated Java ME JAD, or Emulated Java ME MIDlet.

    Figure: Running a MIDlet

  2. Double-click the Emulated Java ME MIDlet option in the left pane to create a new configuration.

    Figure: Creating a new configuration

  3. Specify the name of the configuration.

  4. Select the project using the Browse button.

  5. In the Executable section, select the MIDlet option and click the Search button. This displays the Choose MIDlet dialogue box.

    Figure: Choosing a MIDlet to be emulated

  6. Select the MIDlet and click the OK button to close the dialogue box.

  7. Click the Emulation tab.

    Figure: Selecting project device

  8. In the Device section, ensure that Project Device is selected.

    If want to run your MIDlet on another device, perform the following steps:

    1. Select the Specific Device option.

    2. Select the appropriate SDK and Device in the Device section.

  9. Click Apply to save the changes.

  10. Click Run to run the MIDlet. This launches the MIDlet on the emulator.

Note:

Ctrl + K is the hot key used to kill the MIDlet as shown in the figure below.

Figure: MIDlet exited properly

Note:

You may get compilation and runtime errors when you run your MIDlet. Debug your MIDlet to resolve the errors.