How to run java MIDP applications on a Palm handheld
Wednesday, December 12th, 2007The 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
- 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.
- Install websphere - unpacking it, e.g. in c:\SDK\websphere
- Install the websphere java runtime on your palm. (J9JavaVMMidp20.prc and j9pref.prc)
- Add C:\SDK\websphere\Tools\bin to your PATH (Control Panel > System, Advanced tab, click Environment Variables, edit the System variable called Path)
- 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.
- 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
- Double-click on the .prc and then hotsync to transfer it to your palm.
- The MIDP application should end up on your Palm and you can launch it just like a regular Palm app, just tap it.