alm OS-based handhelds and smartphones are powerful, pervasive computing devices that have changed the lives of many users through the applications they house. As a Java developer, why not tap into this widely used platform? You can develop applications for Palm and this article shows you how. Learn how to create a small Java application (more specifically, a MIDlet) and deploy it to an emulated Palm device. The instructions assume that you are familiar with MIDlet programming.
To create a J2ME application for the Palm OS, you need to convert your MIDlet to a PRC (Pilot Resource Code). This article first walks you through the creation of a simple MIDlet and then onto the MIDlet-to-PRC conversion.
Set Up Your Palm OS Emulator
Before you begin programming, set up an environment that emulates the Palm-powered handheld. Download
the PalmOS Emulator, Palm OS Emulator Skins, and the ROM images. In order to download these, you need to join the Palm OS Developer Program (a free process). The Palm OS Emulator is available for Windows, MacOS, and Unix. The emulator download includes a PDF document "Using Palm OS Emulator" that breaks down how to install and use the Palm OS emulator.
To get started, unzip the emulator and ROM zip files into a directory of your choice. Unzip the skins file to a subdirectory called Skins under the directory you created and then run Emulator.exe. Next, choose the option to start a new emulator session, as shown in Figure 1.
|Figure 1: Starting a New Emulator Session|
In the subsequent New Session screen (see Figure 2), use the GUI to point to the ROM file that you extracted.
|Figure 2: Pointing the Session to a ROM File|
After pointing to the ROM file, you will see which devices are supported under the ROM file (see Figure 3). Also, pick a Skin that you would like to use. I chose the Standard-English Skin as shown in Figure 3. Next, click OK.
|Figure 3: Specifying More Options for Your Emulator Session|
At this point, you should see the emulator running as shown in Figure 4.
The emulator you see runs Palm OS. To run Java programs, a Palm device (emulated or the real thing) needs to have a J2ME application runtime environment installed. You will install one next. Keep the Palm emulator running for now.