Search This Blog

Wednesday, 12 July 2023

Exercise - 1 of Mobile Application Development Lab

0 comments

Installation of Java Wireless Toolkit (J2ME)

(Experiment 1)

A MIDlet is built using free software packages that are downloadable from java.sun.com.   MIDlet programming requires the following software to be downloaded and installed:

  1. The Java Development Kit (1.3 or greater) (java.sun.com/ j2se/downloads.html)
  2. Connected Limited Device Configuration (CLDC) (java.sun. com/products/cldc/), and
  3. The Mobile Information Device Profile (MIDP) (java.sun.com/ products/midp/). 

You’ll also need the J2ME Wireless Toolkit to develop MIDlets for handheld devices (J2ME SDK, Wireless Toolkit). 

1.  Install JDK

  • First, install the Java development kit. The Java development kit contains the Java compiler and the jar.exe, which is used to create Java archive files 
  • After downloading the Java development kit package, unzip the package and run the installation program.  It is best to accept the default directory, although you are free to choose a different directory for the Java development kit. 
  • Once the Java development kit is installed, place the c:\jdk\bindirectory, or whatever directory you selected for the Java development kit, on the PATH environment variable This enables you to invoke theJava compiler from any where on your computer.

2.  Install CLDC

  • Unzip the downloaded CLDC files from the java.sun.com website onto the d:\j2me directory (J2ME_HOME) on your computer.  You’ll need to create the j2me directory if one doesn’t exist.  
  • Unzipping the CLDC package creates the j2me_cldc subdirectory below the j2me directory. The j2me_cldc has a bin subdirectory that contains the K Virtual Machine and the pre verifier executable files for an assortment of platforms such as win32. 
Each platform is in its own subdirectory under j2me_cldc. Add the j2me\j2me_cldc\bin\win32 subdirectory to the PATH environment variable.

3.  Install MIDP

  • Download and unzip the MIDP file. Be sure to use \j2me as the directory for the MIDP file. 
  • Unzipping the MIDP file creates a midp directory. The name of this directory might vary depending on the version that you download. 
Some versions create a midp-fcs directory, while the 1.0.3 version creates a %J2ME_HOME%\ midp1.0.3fcs directory. You can replace references to this directory with the directory relevant to your midp version. 
  • The midp1.0.3fcs directory also contains a bin subdirectory. And you’ll need to include the \j2me\midp1.0.3fcs\bin subdirectory in the PATH environment variable. 
  • Next, create two environment variables. These are CLASSPATH and MIDP_HOME. 
The CLASSPATH environment variable identifies the path to be searched whenever a class is invoked. The MIDP_HOME environment variable identifies the location of the \lib directory that contains the internal.config file and the system.config file. 
  • Set the CLASSPATH to d:\j2me\midp1.0.3fcs\classes;.
Notice that the CLASSPATH terminates with a period. The period implies the current directory and will cause the current directory to be searched if a class is not found in the \j2me\midp1.0.3fcs\classes directory.
  • Set the MIDP_HOME environment variable to d:\j2me\midp1.0.3fcs

Here is the demo of how to install Java Wireless Toolkit for Mobile Application Development.

J2ME Toolkit:

Here are the links to download the Software and the Lab Manual required for installing J2ME:

Here is the link to have a demo of how to install J2ME Tookit and Netbeans for Mobile Application Development.

Leave a Reply