The desktop war is over. Who won? Mobile devices!
Mobility Everywhere
Archives
« April 2006 »
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
28
29
30
      
Today
XML
Search

Links
 

Today's Page Hits: 32

All | General
« Previous day (Apr 26, 2006) | Main | Next day (Apr 27, 2006) »
20060427 Thursday April 27, 2006
Developing Java applications for Pocket PCs using NetBeans - a dream or reality?
A recently released preview of Mobility Pack for CDC allows to develop Java application for Symbian based devices, in particular for Sony Ericsson P990 and Nokia Series 80, which feature a CDC configuration with Personal Profile. Unfortunately, the tool cannot be used out of box with one of the platforms, which is quite widespread these days,- PDAs running Microsoft Windows Mobile operating system. Luckily, because of extremely versatile build system used in NetBeans, it is not difficult to a basic support for deploying and running the developed application on a Pocket PC device (or emulator). Let's suppose you have some project developed for CDC/PP using Mobility Pack for CDC, ideally using Matisse form designer, and you would like to deploy and run it on a Pocket PC device. For example something like this:


To do so, you need to do some preliminary work first. You need to have either a device, or a full ARM emulator. Fortunately, last year Microsoft released a community preview of Pocket PC emulator running Windows Mobile 2003, which can be downloaded for free from Microsoft site - you just need to have a passport account). You need also ActiveSync to be installed and the device(emulator) paired with the computer running NetBeans. Furthermore you need to have a CDC/PP virtual machine. Fortunately, you get evaluation licenses of a CDC virtual machine from two companies - J9 from IBM (make sure you download a correct version for your device - PDAs are Windows Mobile, embedded devices are usually Windows CE) or CrE-ME 4.1 from NSIcom.

I suppose you have the device/emulator paired and you have successfully installed the virtual machine to it. The next thing you will require is Rapi Tools - these small programs are going to be used to communicate with the device over the ActiveSync connection. You can downloaded the package for free from this site. Unpack an archive to a suitable location (and try to remember it :-)).

Now the last thing to be done is to modify the main build script of the project you would like to deploy and run on the Pocket PC. Open the build.xml file (it should be located and add the following scriptlet into it and modify it to your environment.



The only modification you will need to do if you have used default installation paths for the VMs on the device, is to change the path to the bin directory of the rapi tools installation (I told you, you should have remembered the installation location :-)). The build script is well documented (I believe so :-)), so you shouldn't have problem with modifying it to your environment (for example you might want to remove the reference to Matisse layout when not using it in your project).

Save the modification and hit run - the IDE should build your project, deploy it to the device(emulator) and run it - you should see similar result as on the next image. Be patient, since running can take a while, especially on the emulator, which runs at something like 1/3 of the speed of a real device. And here you go, you just deployed and run the application on a Pocket PC device running Windows Mobile operating system.


To summarize - using this mini-how-to you can easily deploy and run the applications on Pocket PC PDAs running Microsoft Windows Mobile operating system (I tested it with both version 2003 and version 5.0 (the latest)). Unfortunately, you still need to use some SDK to build the application (I was using SDK for P990), but in the future this should not be required. Stay tuned :-).

posted by Martin Brehovsky Apr 27 2006, 04:16:18 PM CEST Permalink Comments [4]