Ok, actually if you were to follow the examples from SUN completely, it may or may not work. Ryan, you got the right link, I been to that link too, what I can say is the guide there is the nearest to make a working example. But I notice there are few minor tweaks you must follow in order to work. Since Ryan didnt mention about the tweaks, I might as well include it here.
Tips and tricks
1. First you need to compile some java apps to convert .class to .prc. My first attempt fails, then I found out, downloading the latest toolkit already have those apps ready.
Go to c:\j2me_cldc\bin\kjava\tools\palm\classes\palm\database.
If you still want to compile it use this:
c:\j2me_cldc\tools\palm\src\palm\database> javac *.java -d c:\j2me_cldc\tools\palm\classes\database
NOTE - make sure this directory exists!!!
---> c:\j2me_cldc\tools\palm\classes\database
Copy the files Wrapper.prc and DefaultTiny.bmp to the new dir.
If it still pops up error then try include jdk1.3/jre/lib/rt.jar in the classpath.
2. To get java -> prc compare the following with examples given by Ryan. *Note* addition class rt.jar and common classpath.
> set path=c:\jdk1.3\bin;%path%
> set allclasspath=".;classes;c:\j2me_cldc\bin\api\classes;c:\jdk1.3\jre\lib\rt.jar"
> set j2meclasspath="c:\j2me_cldc\bin\api\classes;c:\jdk1.3\jre\lib\rt.jar"
> set commonclasspath="c:\j2me_cldc\bin\common\api\classes"
> javac -g:none -d tmp -classpath %allclasspath% -bootclasspath %j2meclasspath% HelloWorld.java
> c:\j2me_cldc\bin\preverify -d classes -classpath %j2meclasspath% tmp
> java -classpath %allclasspath% palm.database.MakePalmApp -v -bootclasspath %j2meclasspath% -classpath classes;%commonclasspath% HelloWorld
If everything is successful then
you should get the .prc in some subdir.