JAD files

The JAD file is another description file that is used for managing and describing the MIDlets that the JAR contains. Each JAR file must be distributed with its own JAD file that is included as a separate file from the JAR package.

The JAD file contains configuration specific attributes that can be used when installing a MIDlet. Eclipse and NetBeans include JAD file editors and can create basic JAD files as well as provide editors for modifying them. JAD files are plain text formatted and can be edited manually after creation. The parameters in a JAD file can be in any order.

For internet distribution, the MIME-type text/vnd.sun.j2me.app-descriptor must be set for JAD files in the web server.

The following table lists the common JAD attributes. There is also a significant number of Nokia-specific JAD attributes. For more information on them, see section JAD and JAR manifest attributes in MIDP Implementation Notes.

Table: JAD and MANIFEST.MF attributes

Parameter

JAD

Manifest

Description

MIDlet-Name

X

X

The name of the MIDlet suite packaged in the JAR file. This name is displayed to the user.

MIDlet-Version

X

X

The version number of the MIDlet suite packaged in the JAR file. Version numbering must have three digits in the format n.n.n. When trying to install an equal or later version of the same MIDlet, the AMS notifies the user with a confirmation dialog. Installing older versions is not allowed.

MIDlet-Vendor

X

X

The name of the MIDlet suite provider. This attribute is presented to the user during installation.

MicroEdition-Profile

X*

X*

The version or versions of the MIDP specification that the MIDlets in this suite can work with.

MicroEdition-Configuration

X*

X*

The Java ME configuration (CLDC) required by the MIDlets in this suite.

MIDlet-n

X*

X*

Attributes that identify the MIDlet in the MIDlet suite. The value n is replaced by a numeric value starting from 1 to identify individual MIDlets. All MIDlets to be included in the MIDlet suite must be added this way.

MIDlet-Jar-URL

X

-

The URL of the JAR file that contains the MIDlet or MIDlet suite described by these attributes.

MIDlet-Jar-Size

X

-

The size of the MIDlet JAR file in bytes.

MIDlet-Description

O

O

A description of the MIDlet suite intended to be displayed to the user.

MIDlet-Icon

O

O

An icon that is used to represent the MIDlet suite in the mobile device's applications menu that contains all installed MIDlets.

For an example, see article Adding an icon to a MIDlet in the Nokia Developer Wiki.

MIDlet-Info-URL

O

O

The URL of a file that contains further information describing the MIDlet suite.

MIDlet-Data-Size

O

O

The minimum amount of persistent storage that this MIDlet suite requires.

MIDlet-Install-Notify

O

O

A URL used to report the success or failure of MIDlet installation performed from a remote server.

MIDlet-Delete-Notify

O

O

A URL used to report the success or failure of MIDlet uninstallation.

MIDlet-Delete-Confirm

O

O

Specifies the confirmation prompt shown by the Application Management Software (AMS) when the user selects to remove the MIDlet or MIDlet suite.

For the localized version of this attribute, see Nokia-MIDlet-Delete-Confirm-<locale>.

This attribute is supported from Java Runtime 2.1 for Symbian onwards for all protection domains.

Example:

MIDlet-Delete-Confirm: Are you sure you want to delete this MIDlet?

MIDlet-Permissions

O

O

Requested permissions by the MIDlet. Multiple permissions can be specified and are separated by commas.

MIDlet-Permissions-Opt

O

O

Requested optional permissions

MIDlet-Jar-RSA-SHA1

O

-

Defines the JAR signature (for trusted MIDlets only).

MIDlet-Certificate-n-m

O

-

Defines the public key certificate (for trusted MIDlets only).

MIDlet-Push-n

O

O

Push static registration. For further information, see section Push applications.

MIDlet-specific attributes

O

O

MIDlet developers can provide limited configurability for MIDlets by including attributes that can be retrieved at runtime.

For example, you can create a custom JAD attribute and retrieve its value with the MIDlet.getAppProperty method.

X = mandatory

X* = must be present in eitherMANIFEST.MF or JAD file.

O = optional

- = not supported

When the JAD file and MANIFEST.MF file have conflicting attributes, the JAD file overrides the attributes of the MANIFEST.MF.

An example manifest file might look like this:

MIDlet-Name: MyMIDlet
MIDlet-Version: 0.0.1
MIDlet-Vendor: Nokia
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: HelloWorldMIDlet, , example.hello.HelloWorldMIDlet

An example JAD file might look like this:

MIDlet-Name: MyMIDlet
MIDlet-Version: 0.0.1
MIDlet-Vendor: Nokia
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: MyMIDlet.jar
MIDlet-Jar-Size: 1887
MIDlet-1: HelloWorldMIDlet, , example.hello.HelloWorldMIDlet