Java Reference
In-Depth Information
If you are using a tool like the J2ME Wireless Toolkit, you don't need to worry much about
MIDlet suite packaging because most of the details are handled automatically. If you want
to understand things at a lower level, or if you're just curious, keep reading for a complete
description of MIDlet suite packaging.
Packaging a MIDlet suite consists of three steps:
1.
The class files and resource files that make up the MIDlets are packaged into a JAR file.
Usually, you'll use the jar command-line tool to accomplish this.
2.
Additional information that's needed at runtime is placed in the JAR's manifest file. All
JARs include a manifest; a MIDlet suite JAR contains some extra information needed by
application management software.
3.
An application descriptor file should also be generated. This is a file with a .jad extension
that describes the MIDlet suite JAR. It can be used by the application management
software to decide whether a MIDlet suite JAR should be downloaded to the device.
MIDlet Manifest Information
The information stored in a MIDlet's manifest file consists of name and value pairs, like a prop-
erties file. For example, an unadorned JAR manifest might look like this:
Manifest-Version: 1.0
Created-By: 1.4.2_04 (Sun Microsystems Inc.)
A MIDlet JAR manifest for Jargoneer looks like this:
Manifest-Version: 1.0
MIDlet-1: Jargoneer, Jargoneer.png, Jargoneer
MIDlet-Name: Jargoneer
MIDlet-Version: 2.0
MIDlet-Vendor: Sun Microsystems
Created-By: 1.4.2_04 (Sun Microsystems Inc.)
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.0
The extra attributes describe software versions, class names, and other information about
the MIDlet suite. The following attributes must be included:
MIDlet-Name : Despite the moniker, this attribute actually refers to the name of the entire
MIDlet suite, not just one MIDlet.
MIDlet-Version : This describes the version of the MIDlet suite. It's a number you pick
yourself in the form major.minor.micro .
MIDlet-Vendor : This is your name or the name of your company.
MIDlet-n : For each MIDlet in the MIDlet suite, the displayable name, icon file name, and
class name are listed. The MIDlets must be numbered starting from 1 and counting up.
For example, several MIDlets in a single MIDlet suite could be listed like this:
Search WWH ::




Custom Search