Most java applications for mobile devices are so called 'MIDlets'. Midlets can run on most mobile phones and those Windows mobile devices that have java support. Your device does not have java support which is why you are reading this article :-). The IBM J9 WEME java runtime environment works on Windows Mobile 2003 and above. The smartphone version will work on smartphones and PDA's.
The documentation by IBM is aimed at intermediate level software developers and definitely not at beginners or end-users.
The following assumes you want to run MIDlets on your Windows mobile device:
- Download IBM J9 WEME for windows mobile smartphone edition. The page is here: http://www-128.ibm.com/developerworks/websphere/zones/wireless/weme_eval_runtimes.html?S_CMP=rnav, you need to register and then get the download.
- If your are not sure which processor / windows version you have, choose this one: Windows Mobile 5.0 Smartphone Edition, ARM, CLDC 1.1, MIDP 2.0, iMate SP5m, Dopod 577w. Its the last entry in the first table on the page. I tried it succesfully on three devices (HTC/QTec/MDA, HP iPaq and MIO). Once you have registered and got to the download bit of IBM's site you will most likely get this file: ibm-weme-wm50-sp-arm-midp20_22.214.171.12460727-102926.exe. (If there is a newer version on the site, check that the first 27 characters are the same; ibm-weme-wm50-sp-arm-midp20....). The file is about 80MB but don't be alarmed, you only install about 3MB on your device. Why IBM chooses to include 77 MB of stuff you are not interested in is a mystery to me.
- Run the file, and let the installer do its stuff. It will install a directory structure on your PC.
- Go to the installed directory (on my PC it looks like this: C:\IBM\WEME\runtimes\61\wm50-arm-sp-midp20) and open the zip file: weme-wm50-sp-arm-midp20_126.96.36.19960727-102926.zip. It contains the runtime for windows mobile. Extract the directories bin, lib and examples to somewhere on your PC.
- Create a directory J9 on your windows mobile device. It can be on the device itself or on a storage card. Copy the directories bin, lib and examples to the J9 directory on your windows mobile device.
- Open file explorer on your device and go to J9/bin. Run the file emulator.exe. If you get an empty screen with 'Install' and 'Action' menu's at the bottom of the screen the installation was succesful.
Now run your first MIDlet
Run emulator.exe on your windows mobile device (see above) and choose 'Install'. Enter a URL (a what? i hear you say) that refers to your MIDlet. The syntax for installing files that are on your windows mobile device is: file://[path to file]. So to install the example MIDlet included in the installation enter file:///Storage Card/J9/examples/GolfScoreTrackerSuite.jad (this assumes you have installed the java runtime in a directory J9 on your storage card).
Thats it for now. A couple of things i will be writing about later on are:
- How to create shortcuts that run a midlet directly.
- How to tweak the runtime environment to get rid of the annoying security questions i.e. "XYZ Midlet wants to connect to a website, do you want this to happen?".
- How to get midlets to access the file system.