Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Port Your Java MIDlets to a Palm Device : Page 4

The Palm platform is a significant portion of the pervasive computing space. Porting your J2ME MIDlets as pilot resource code opens the door to this large Palm device audience with little coding effort.


advertisement

Convert from MIDlet to PRC

Click to enlarge 
Figure 13. Launching the PRC Converter Tool

So far, you have created a MIDlet deployable to a J2ME device. However, the Palm OS can't readily invoke a MIDlet. You must convert your MIDlet to a PRC file. The PRC Converter Tool, which was installed when you extracted the MIDP for Palm OS zip file, handles this for you. Look in the directory you extracted the zip file into for a directory called midp4palm1.0\Converter. You should find a batch file named converter.bat, which assumes that you have an environment variable named JAVA_PATH set to your Java installation directory. If you don't, create such an environment variable and then invoke the batch file. Doing so will launch the PRC Converter Tool (see Figure 13).

Click to enlarge 
Figure 14. The Convert Option of the PRC Converter Tool



To convert your TimeTeller MIDlet to a PRC file, you simply need to use the File>Convert option in the PRC Converter Tool (see Figure 14).

In the following "Choose your JAD files" window, point to the TimeTeller.jad file in the output directory you created and click the Convert button as shown in Figure 15.

Click to enlarge 
Figure 15. Choosing a JAD File

Doing so should produce a Success message as shown in Figure 16.

All you have left is to drag and drop the TimeTeller.prc file you just produced onto the Palm OS Emulator (or if you are deploying to a real Palm device, use the Palm Install Tool and perform a synchronization operation). Either way, you should see the TimeTeller application installed to your target device as shown in Figure 17.

Click to enlarge 
Figure 16. Successful Conversion of the MIDlet into a PRC

Clicking the TimeTeller application should yield the fruits of your labor: your MIDlet running on your Palm as shown in Figure 18.

Click to enlarge 
Figure 17. Confirming Installation of the Time Teller PRC

Your Door to the Pervasive Computing Space

Now you know how to create a J2ME application in the form of a MIDlet and transform it into a PRC file that is deployable to a Palm device. The MIDlet you deployed to Palm in this article was quite simple, but you can create more powerful MIDlets that tap into the offerings of J2ME, including games and mission-critical enterprise applications that use Web services (see Turn Your J2ME Mobile Devices into Web Service Clients).

Click to enlarge 
Figure 18. Output of the TimeTeller Application Invoked on the Palm

As Palm platform users represent a significant portion of the pervasive computing space, being able to cater to them by simply porting your new and existing J2ME MIDlets as PRCs opens the door to a much larger audience with little coding effort.



Kulvir Singh Bhogal works as an IBM consultant, devising and implementing J2EE-centric solutions at customer sites across the nation.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap