Sunday, July 17, 2011

Deploying J2ME Applications on Windows Mobile


These days I am working on a J2ME based mobile application development project and that mobile application is required to be deployed in a PDA (Personal Digital Assistant) where the Windows Mobile 6.1 Operating System available. Even if I have developed and deployed mobile application for wide range of java enabled mobile devices that are manufactured by leading mobile manufactures  Nokia, Sony Ericson etc…, I was little bit confused in this case. This is because I have never had experience on deploying J2ME applications for the PDA devices whose operating system is Windows Mobile. However after a lengthy study of internet materials, eBooks and so on.., I was able to run the Mobile Application on the PDA successfully.  Finally I decided to share my experience on this mobile development with others because; this might be useful for some of you at some point of your career. It is important to note that the deploying J2ME application on Windows Mobile Device is only a deployment time/level effort (not a development time effort). Therefore you are free to develop the mobile application in your development environment using one of the mobile emulator/simulator as wish. Once it is developed, it can be deployed in any device where the Windows Mobile OS operates. The following tutorial shows you how to deploy it.
First download the JavaFX mobile (latest version) for the Windows Mobile. It is available to be downloaded at the following site. It will be easy to install if you download this software from your PDA web browser. This is because the JavaFX should be installed in your PDA device.


Once the download is completed, just open the file and browse it.  The file is in the Zip format and you will be able to see a file called SUN_JAVAFX.CAB under that zip file. Please refer the below screenshot.


Once the SUN_JAVAFX.CAB is fond, double click on it to launch the JavaFX application installer. It will ask for your permission to continue with the installation process and click on YES to proceed. Please refer the below screenshot.


 
Once the permission is granted to proceed with the installation process, it will prompt another screen to select the storage location for JavaFx application installation. Please refer the below screenshot.




After selecting the storage location, click on Install to start the installation process. It will display below screen to indicate the carrying out of the installation process.


 
If the installation process is successfully completed, the below screen should be displayed.



Now the JavaFX is successfully installed in your PDA and it is ready to launch. In order to launch it, open the Programs of the PDA. Then you will see an icon called JavaFX. Double click on it. Please refer the below screenshot.



 
Once the JavaFX application is launched, it will display the below screen. You can see that there are set of sample applications are available. (e.g.:- calculator application) You can just double click on one of the sample application and have a look at it. Please refer the below screenshot.

Now we are ready to deploy our application which is build using J2ME on our PDA device. Io order to install your application, it is required to have related JAR and JAD file for that application. In my case, I transferred those two files using my email (GMAIL).  I attached those two files to email. Then I access that email from the web browser available in the PDA. I just click on the JAD file and it launches the application installer. It asks for my permission to continue with the installation. Once the permission is granted, it asks for the installation location of the application (select your decided location for the application).In my case, I selected root as the installation location. This took few minutes to complete the installation. Once the installation is completed, the application can be started by double clicking the JavaFX icon under the programs section. Please refer the below screenshot.





Important:-
If the application is modified, then it will be required to install the newly modified version of the Mobile application on the PDA. In order to o this you have to re-install the install the application in your PDA. When building the JAR file and JAD file for the re-installation, make sure that you have changed the version number of the mobile application. Otherwise the PDA will discard the installation process because, the application version that you are trying to install is already available in the PDA. The application version should be changed in the JAD file. If you are using the Apache Ant ,it may be required to change  the application version in the build.xml file too. Therefore please make sure that the JAD file version is reflected in the build.xml file.


2 comments:

  1. Thanks for the article, so simple and not as confusing as those complicated ones the experts give. give us some more. cheers!

    ReplyDelete
  2. Thank you Dawudi Miiro for your appreciation. :)

    ReplyDelete