Editing the JAD file
The JAD file that contains the information about the contents of the
JAR file can be edited in MTJ. In MTJ, 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: We recommend you to provide
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 attempts to send an invalid JAD file to a phone
will result in a JAR download error.
To edit the JAD file
To edit the Jad file, you need to have a MTJ project created. MTJ creates
the JAD file automatically with default MTJ information, and therefore
we recommend you to edit the properties to match those of your organization.
In the Package
Explorer view, expand the project which you want to edit the JAD
file for 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
This 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
This is 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. As with the Microedition
Configuration, 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
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
will be shown to the user.
- Icon
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, suc has the
optional MIDlet permissions. These properties are defined in the Java ME
specification, but they are not required. The properties are:
- MIDlet permissions
These are 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
This is the minimum number of bytes of persistent data required
by the MIDlet. The device may provide additional storage according to
its own policy. The default is zero.
- MIDlet description
This is 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
This is 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
Here you can enter a text message provided to the user when prompted
to confirm deletion of the MIDlet suite.
- MIDlet delete notify
Here you can enter the URL to which a POST request is sent to confirm
successful deletion of this MIDlet suite.
- MIDlet install notify
Here you can enter 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 user defined or remove 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 Java Platform
Java ME projects

Managing applications

JAD file