Editing the JAD file
The JAD file contains information about the MIDlets that are included
in the JAR file, such as deployment and user defined properties. Edit
the JAD file before deployment to a mobile device.
Note: Consider providing the
edited JAD file with the mobile tool applications, since increasingly
more and more mobile devices demand the JAD file to be provided with JAR
file applications. Any attempt to send an invalid JAD file to a phone
results in a JAR download error.
To edit the JAD file
To edit the Jad file, you need to have an MTJ project created. MTJ creates
the JAD file automatically with default MTJ information, and therefore
you must edit the properties to match those of your organization.
In the Package Explorer view, expand the project
for which you want to edit the JAD file and double-click the project's
source JAD file.
The Application Descriptor Editor opens.

In the Required
tab, enter the required MIDlet suite properties. These are:
- MIDlet Jar URL
The URL from which the JAR file can be loaded. Edit this to point
at the JAR file. Note that the Java ME specification requires that an
absolute URL is required in the JAD file; relative URLs are not guaranteed
to work.
- MIDlet Name
The name of the MIDlet suite that identifies the MIDlets to the
user.
- MIDlet Vendor
The name of the organization that provides the MIDlet.
- MIDlet Version
The version number of the MIDlet suite. The format is <major>.<minor>.<micro>
as described in the Java Product Versioning Specification. The Java ME
container can use this for install and upgrade purposes, as well as for
communication with the user.
- Microedition Configuration
The Java ME Configuration (CLDC version) required by this MIDlet
suite. The contents of this drop-down menu depend on the CLDC versions
supported by the Wireless Toolkit that you are using for this project.
- Microedition Profile
The Java ME profile required by this MIDlet suite. The contents
of this drop-down menu depend on the profile versions supported by the
Wireless Toolkit that you are using for this project.
In the Midlets
tab, define the MIDlets that make up the MIDlet suite.
You can add or remove midlets by clicking Add
or Remove. The columns
are:
- Name
The name of the MIDlet. If there are multiple MIDlets in your suite,
when the user invokes the suite, the Java ME device will typically prompt
the user for the specific MIDlet to be executed. This entry provides the
name that is shown to the user.
- Icon
The path to the PNG file within the JAR file that contains the
icon for this particular MIDlet. Note that you can add icons for all the
MIDlets in your MIDlet suite.
- Class
The MIDlet class itself. This is the class you created derived
from javax.microedition.midlet.MIDlet. To change the class, click the
grey button that appears when you highlight the class. This opens the
Choose Midlet window, in which you can choose the MIDlet class.
Note: On
this tab, you must have one entry for each MIDlet in your MIDlet suite.
If you selected the Add to Application Descriptor option when you created
the MIDlet class, an entry is automatically made for you. If not, you
must use the Add button to add an entry for your MIDlet.

In the Optional
tab, you can specify the MIDlet suite properties, such as the optional
MIDlet permissions. These properties are defined in the Java ME specification,
but they are not required. The properties are:
- MIDlet permissions
The permissions that your MIDlet must have in order to operate
correctly. Permissions are usually only provided for signed MIDlets.
The MIDlet permissions can be set using the Security management
dialog.
- Optional MIDlet permissions
The optional MIDlet permissions can be set using the Security management
dialog.
- MIDlet data size
The minimum number of bytes of persistent data required by the
MIDlet. The device can provide additional storage according to its own
policy. The default is zero.
- MIDlet description
The description of the MIDlet suite.
- MIDlet icon
The name of a PNG file within the JAR file used to represent the
MIDlet suite. It is the icon used by the Java Application Manager to identify
the suite. This icon is for the whole suite, and not for the individual
MIDlet icons you can set up on the Midlets
tab.
- MIDlet information URL
The possible URL for information further describing the MIDlet
suite.
Note:
For more information on MIDlet permissions, refer to Sun
Developer Network.

In the OTA
tab, you can confirm Over the Air (OTA) deployment properties.
These properties include:
- MIDlet delete confirm
A text message provided to the user when prompted to confirm deletion
of the MIDlet suite.
- MIDlet delete notify
The URL to which a POST request is sent to confirm successful deletion
of this MIDlet suite.
- MIDlet install notify
The URL to which a POST request is sent to confirm successful installation
of this MIDlet suite.

In the User Defined
tab, you can add or remove user-defined key-value pairs by clicking Add or Remove.
The key string is used to retrieve the value and the value is associated
with the key.

In the menu bar, select File
-> Save.

Mobile Tools for the Java Platform
Java ME projects

Managing applications

JAD file