Sun Microsystems J2ME manual Running the Emulator Solo, Using Third Party Emulators

Models: J2ME

1 134
Download 134 pages 62.02 Kb
Page 48
Image 48

When the emulator is running, choose MIDlet > Pause from the emulator window’s menu. The running MIDlet is paused and the screen displays an “Incoming Call...” message.

To resume the MIDlet’s operation, choose MIDlet > Resume from the menu.

4.5Running the Emulator Solo

During development, you will most often run the emulator directly from KToolbar by pressing the Run button or using the Project > Run via OTA feature. For testing or demonstrations, you might wish to run the emulator by itself. Several different approaches are described in this section. The program group created by the J2ME Wireless Toolkit installer includes several items that pertain to running the emulator by itself.

To run an application directly, which is analagous to pressing KToolbar’s Run button, choose the Run MIDP Application... item. The toolkit prompts you to locate a MIDlet descriptor file on your local disk. Note that the corresponding MIDlet suite JAR must also be present.

To run the emulator’s Application Management Software (AMS), choose the OTA Provisioning item, which is roughly analagous to KToolbar’s Run via OTA feature. The emulator pops up with the AMS welcome screen, and you can install applications by typing in a URL.

To change the emulator’s preferences, choose the Preferences item from the toolkit program group. This pulls up the same preferences window as choosing Edit > Preferences... from the KToolbar menu.

The J2ME Wireless Toolkit utilities are also accessible without running KToolbar. Just choose the Utilities item.

Finally, you can change which emulator skin is used by default. Choose the Default Device Selection item, and choose one of the available emulator skins. Next time you launch the emulator the selected skin is used.

You can also run the emulator from a command prompt. See Appendix B, “Command Line Reference,” for more information.

4.6Using Third Party Emulators

Third party companies, like device manufacturers and wireless carriers, sometimes create device emulators that are compatible with the J2ME Wireless Toolkit. You can gain experience running your application on a wider variety of implementations by installing additional emulators into the toolkit. The procedure

36 J2ME Wireless Toolkit User’s Guide • October 2004

Page 48
Image 48
Sun Microsystems J2ME manual Running the Emulator Solo, Using Third Party Emulators