After having a good read of A Small Cup of SWT, I’ve decided to test out one of the sample apps to see what’s doable. The good news is that it’s all very doable! Look at the nativeness of this:

My First SWT Pocket PC app

After paying my $US5.99, and downloading 80Mb IBM’s J9 Runtime from Handago I was in business. Setup Eclipse to use the J9 as it’s runtime so I could check I was only using the right subset of java.*, downloading the pocket pc SWT from the Eclipse site (I used the J2SE version of the Pocket PC stuff to get maximum capability).

Compiled up my sample class (HelloSWT.class) on the PC, then copied the .class file to my device. The only magic required was to create the Hello.lnk file per the FAQ. The spaces in the paths needed some sorting, so I ended up with some interesting quoting (and what’s the leading 68# for? A filetype thingy?):

68#"Program FilesJ9PPRO10binj9w.exe" -jcl:ppro10
   -cp "My DocumentsJavaswt.jar;My DocumentsJava"
   HelloSWT

and I was in business. Haven’t worked out how to change the icon yet to something non-IBM, but still, it’s working!

Big thanks to Vik for tipping me off on J9.

BTW, if you need a free Screen Capture app for Pocket PC, I can recommend Pocket Screen Capture v1.0 from cetoolbox.com. Good stuff - you just need to make sure you can set up your screen grab in the five seconds they give you to get ready!