MyHelloWorld: Creating
simple MIDP application (MIDlet) step by step
The MIDP application (MIDlet), MyHelloWorld,
is my first exercise in MIDP for PalmOS. I will show you the steps to
creat Java application for Palm.
Step 1:
Run J2ME Wireless Tookit, KToolbar and click the New
Project button.
Step 2:
Type MyHelloWorld on both Project name and MIDlet
Class Name. And click Creat Project.
Step 3:
Settings for Project "MyHelloWorld" will be
shown. Just accept the default settings by clicking on OK button.
Step 4:
KToolbar will create the project diredctories for you.
Your project will be in directory
C:\WTK104\apps\MyHelloWorld
You have to write your source file in
C:\WTK104\apps\src\MyHelloWorld\MyHelloWorld.java
Step 5:
Copy All the code inside below text box and
save as
C:\WTK104\apps\MyHelloWorld\src\MyHelloWorld.java.
¡@
Step 6:
Click the Build button and Run button to start the
emulation on your PC.
If all your settings of J2ME Wireless Toolkit and POSE are correct,
a new session with MyHelloWorld of POSE will start.
Step 7:
After verified in POSE, you can Create Package.
KToolbar will generate the target .jar and .jad for
you.
It will be in:
C:\WTK104\apps\MyHelloWorld\bin\
Step 8:
Now you can convert the .jad and .jar to PalmOS needed
.PRC file.
Click File>Utilities...>
Select PalmOSEmulator
click Generate PRC button to call-up PRC Converter Tool
Browse C:\WTK104\apps\MyHelloWorld\bin\ and select MyHelloWorld.jad
file.
Step 9:
OK, successful.
Now you can download the generated MIDlet,
MyHelloWorld.prc, to your Palm as other Palm application. Make
sure that you have already download MIDP.prc, MIDP for PalmOS,
to your Palm before run the MIDlet.
If you want to try it
firstly, it can be downloaded here: