Thursday, March 29, 2007

Steps for Configuring Java for Palm Os Application Development

1. Install a 'regular' j2se sdk (http://java.sun.com/j2se/1.5.0/download.jsp)
2. Install 'J2ME wireless toolkit' (WTK) from sun (
http://java.sun.com/products/j2mewtoolkit/download-2_2.html)
3. Install 'Websphere Everyplace Micro Edition for Palm' (WEME) (
https://www.developerpavilion.com/palmos/page.asp?page_id=365&tool_id=104) and copy the content of the directory Tools/lib installed to the lib/ subdirectory of your jdk (installed at step 1)
4. Install 'Palm OS Garnet 5.4 Simulator' from PalmSource (
https://www.developerpavilion.com/palmos/page.asp?page_id=365&tool_id=8)
Copy J9JavaVMMidp20.dll from Java_Tech_for_Garnet_WEME57\JVM\Simulator installed at step 3 in the same folder than PalmSim_54_rel.exe installed during previous step
Create a folder 'Autoload' in the same folder than PalmSim_54_rel.exe and copy inside it all the prc files from Java_Tech_for_Garnet_WEME57\JVM\Simulator (not all of them are needed actually but anyway...)
5. Install Eclipse (
http://eclipse.org/)
6. Install EclipseME (
http://eclipseme.org/) within eclipse and configuring the location of WTK (see EclipseME documentation : http://eclipseme.org/docs/installation.html)
Run Eclipse and create a new project of type 'J2ME Midlet Suite' dans 'J2ME' (ctrl-n) named HelloMIDlet
7. Create a new class within the project (right mouse button on HelloWorld project in the 'Package Explorer' view then 'New' and 'Class') named HelloMIDlet
Replace the generated content of the file HelloMIDlet.java with the Sun tutorial :
http://developers.sun.com/techtopics/mobility/midp/articles/wtoolkit/src/HelloMIDlet.java
Edit HelloWorld.jad by double-clicking on it, select 'Midelts' tab, click 'Add' then 'New Class' then 'New Midlet' then select HelloWorld and save (ctrl-s)
8. Create jar file (right mouse button on project, J2ME menu then 'create package') which will be created in the 'deployed' project subdirectory
9. Run jartoprc_w.exe from the Tools/bin of WEME installed at step 3, browse to select the jad file (not jar) copied by eclipseME in the 'deployed' directory and click 'generate PRC'
10. Run the simulator installed at step 4 (PalmSim_54_rel.exe)
11. Install the prc by drag & dropping it on the simulator window
12. Click on the icon to run the application within the simulator
13. For a real device you need another JVM installed :
http://www.palmone.com/us/support/jvm
14. They are some ways to automate the build process using ant tasks also, basically it uses antenna :
http://antenna.sourceforge.net/

1 comment:

Unknown said...

When I run eclipse, I could not get past entering the project name HelloMIDlet because there were no devices continued.

I have a Treo 650 and I have followed your instructions to step 6, but as for device configuration, it failed.

Also, I cannot find devices to install in that step.