When facing the problem of porting Java to the myriad of handheld and dedicated devices that constitutes the new wave of portable devices while preserving the advantages of the Java platform (portability, security, with an high-level language-widespread among developers), Sun engineers have devised a particular architecture, composed of few configurations for defining the common features for a class of devices (they comprise the virtual machine, core libraries, and some APIs) while leaving the differences of each device described by a so-called profile.
Profiles are thought of as gathering together not only common devices (such as mobile phones, for example), but also common applications.
The two configurations currently provided for the J2ME platform are the following:
A need among device manufacturers is the capability to dynamically change the features provided by the device. That is to say, the software is not hard-coded within the device once and for all, but could be to some extent dynamically loaded. Here, deployment techniques come into play.
The configurations don't address lifecycle issues (installation, launching, and removal), leaving these and other features to their profiles. Therefore, we are obliged to discuss deployment issues on a per-profile basis. The following section discusses the deployment of the Mobile Information Device Profile (MIDP).
The Mobile Information Device Profile (MIDP) is a set of Java APIs that, together with the Connected Limited Device Configuration (CLDC), provides a complete J2ME application environment defining issues such as user interface, the application model, networking, and persistence storage for mobile devices such as cellular phones and the so-called two-way pagers. The code proposed here was developed and executed on the J2ME Wireless Toolkit from Sun, available at http://www.javasoft.com/products/j2mewtoolkit/
The key component in the deployment of MIDlets is the Java Application Descriptor (JAD) file that describes all the deployment-related details for a MIDP executable. Application Descriptor Files An application descriptor file is a text file, encoded with Unicode, with the suffix .JAD. It is made up of text lines composed as follows:[attribute-name]+': '+[value]
Such attributes can be read by MIDlets using the static method MIDlet.getAppProperty. Listing 1 shows an example of a JAD file.Listing 1 An Example Of a Java Application Descriptor (JAD) File.
MIDlet-Name: MIDletApplication
MIDlet-Version: 0.0.1
MIDlet-Vendor: myself
MIDlet-Jar-URL: http://www.awebsite.biz/apps/app.jar
MIDlet-Jar-Size: 1234
MIDlet-Data-Size: 256

Figure 1 The waterfall software lifecycle model.