Photo credit: Windell H. Oskay, www.evilmadscientist.com bridell.com
on creative engineering and new media art

How to run java MIDP applications on a Palm handheld

December 12th, 2007

The problem

I have a Java MIDP application, made with WTK, maybe using EclipseME or mobile processing. I want to run it on my Palm.

After digging into ways of doing this, I wound up running an application called jartoprc but it kept giving me “Error: An invalid PRC was created (0 bytes in size).”.

The solution

Prerequisites

I’m assuming you already know how to set up Java JDK and about building MIDP applications - maybe how to get started using mobile processing.

Step by step

  1. Get the websphere micro edition - one way is it might be bundled with your Palm, another is buying it from Palm [where was it? Have to look], and another is joing PalmSource Developer ACCESS network, after which you can download it for free. You should do this anyway to apply for a palm developer id.
  2. Install websphere - unpacking it, e.g. in c:\SDK\websphere
  3. Install the websphere java runtime on your palm. (J9JavaVMMidp20.prc and j9pref.prc)
  4. Add C:\SDK\websphere\Tools\bin to your PATH (Control Panel > System, Advanced tab, click Environment Variables, edit the System variable called Path)
  5. Here’s the trick: the files in the C:\SDK\websphere\Tools\lib folder - charconv.zip and the folder jclFoundation10 containing classes.zip, locale.zip and maps.zip - should all be copied to your JAVA_HOME/lib folder. Copy the single zip file and the folder. It will not work (at least not for me) to add these to your classpath in other ways.
  6. When you have the jad and jar file, go to the directory and build the prc using a command like jartoprc -jar:MyApp.jar -id:MYID
  7. Double-click on the .prc and then hotsync to transfer it to your palm.
  8. The MIDP application should end up on your Palm and you can launch it just like a regular Palm app, just tap it.

References

http://pluggedin.palm.com/regac/pluggedin/JavaFAQ.jsp