C H A P T E R  7

Configuring the Palm OS Emulator

If you want to run the Palm OS Emulator that is included with the J2ME Wireless Toolkit 1.0.4, you must install the emulator before installing the Sun Java Studio Mobility IDE. You can download the emulator from http://www.palmos.com/dev/tech/tools/emulator/.

You must first configure the emulator as follows:

1. Redirect NetLib calls to the host's TCP/IP.

For certain functions like debugging and Internet connectivity to work, you must set NetLib API calls to be redirected from the Palm OS Emulator to use your computer's TCP/IP.

a. Run the Palm OS Emulator and right-click the emulator.

A menu appears.

b. Select Settingsright arrow Properties...

The Properties dialog appears.

c. Check the Redirect NetLib calls to host TCP/IP box, and click OK.

The Properties dialog disappears.

d. Right-click the emulator and select Save.

Your changes are saved.

2. Disable debugging.

The Palm OS Emulator allows various items to be debugged while the application executes. However, for the Palm OS Emulator to work with the Sun Java Studio Mobility IDE, debugging must be disabled altogether.

a. Run the Palm OS Emulator, and right-click the emulator.

A menu appears.

b. Select Settings right arrow Debugging...

The Debug Options dialog appears.

c. Uncheck all the boxes and click OK.

The Debug Options dialog disappears.

d. Right-click the emulator and select Save.

Your changes are saved.

3. Set the Palm OS Emulator location in the Sun Java Studio Mobility IDE.

The first time you run an application using the Palm OS Emulator through the Sun Java Studio Mobility IDE, a dialog appears, asking you for the Palm OS Emulator location. After you set the location, the dialog will not appear again when you run MIDP applications using the emulator.