Java Reference
In-Depth Information
Listing 3-2. The WeatherWidget JAD File
MIDlet-1: Weather,,com.apress.rischpater.weatherwidget.WeatherWidget
MIDlet-Jar-Size: 2858
MIDlet-Jar-URL: WeatherWidget.jar
MIDlet-Name: WeatherWidget
MIDlet-Vendor: Ray Rischpater
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1
This is a bare-bones JAD file, built by the NetBeans IDE from the project properties I
defined when creating the application. Relevant fields include
MIDlet- n
: The name, the path in the JAR file to the icon, and the class name for the
n th MIDlet in the MIDlet suite.
MIDlet-Jar-Size : The size in bytes of the MIDlet suite's JAR file. This must match the
actual size of the JAR file, or many devices won't accept the JAR file.
MIDlet-Jar-URL : The URL of the JAR file for the MIDlet.
MIDlet-Name : The name of the MIDlet suite.
MIDlet-Vendor : The name of the vendor of the MIDlet suite.
MIDlet-Version : The version number of the MIDlet suite.
MicroEdition-Configuration : The version of the Java ME VM (CDC or CDLC and
version number) required by the MIDlet suite.
MicroEdition-Profile : The profile used by the MIDlet, including its version number.
You set these attributes in the Project Properties window in the Applet Descriptor
section. The Applet Descriptor section has separate subsections for generic attributes
and MIDlet attributes. As part of the JAD file, you also specify items for the push registry
and API permissions —two kinds of information new to MIDP 2.0 ( JSR 118).
The push registry and the corresponding Push API let the application manager acti-
vate your MIDlet based on incoming events such as an inbound network connection, an
SMS message, or a timer alarm. The information you provide for a push-registry entry is
a tuple consisting of the inbound endpoint, the class name to receive the push, and a fil-
ter indicating valid originators of the push. I discuss this in more detail in Chapter 14.
Push-registry entries are specified using the name MIDlet-Push- n
, where n is an integer
indicating a unique push entry.
 
Search WWH ::




Custom Search