Java Reference
In-Depth Information
MIDlet-1: Sokoban, /icons/Sokoban.png, example.sokoban.Sokoban
MIDlet-2: Tickets, /icons/Auction.png, example.lcdui.TicketAuction
MIDlet-3: Colors, /icons/ColorChooser.png, example.chooser.Color
MIDlet-4: Stock, /icons/Stock.png, example.stock.StockMIDlet
•
MicroEdition-Configuration
: This attribute describes the J2ME configurations upon
which this MIDlet suite can run. Multiple configuration names should be separated
by spaces.
•
MicroEdition-Profile
: This describes the set of profiles upon which this MIDlet suite
can run. For MIDP 2.0 applications, this is
MIDP-20
. For applications that can also run on
the older MIDP 1.0 profile, use “MIDP-2.0 MIDP-1.0”.
In addition to the required manifest attributes, the following attributes may be defined:
•
MIDlet-Description
: The description of the MIDlet suite goes in this attribute.
•
MIDlet-Icon
: Icons for individual MIDlets are described in the
MIDlet-n
attributes. This
attribute specifies an icon to represent the entire MIDlet suite.
•
MIDlet-Info-URL
: If additional information about the MIDlet suite is available online,
use this attribute to list the URL.
•
MIDlet-Data-Size
: If you know how many bytes of persistent data are required by the
MIDlet suite, you can specify the number with this attribute.
■
Tip
Don't get tripped up by the attribute names. Many of them appear to refer to a single MIDlet, like
MIDlet-Name
and
MIDlet-Description
. In fact, these attributes describe an entire MIDlet suite. The only
attribute that applies to a specific MIDlet is the
MIDlet-n
attribute, which is used to list each MIDlet in
the suite.
Several additional attributes may be included. Network APIs can be protected from unau-
thorized access using a permission scheme, which will be fully discussed later in this chapter.
MIDlets can list necessary permissions and optional permissions in the MIDlet JAR manifest as
follows:
•
MIDlet-Permissions
: Use this attribute to list permissions that are critical to the operation
of the MIDlet suite. Multiple permissions are separated by commas.
•
MIDlet-Permissions-Opt
: This attribute lists permissions that may be used but are not
critical for this MIDlet suite.
Finally, there is also a way for MIDlet suites to signal their dependence on optional APIs:
•
MIDlet-Extensions
: List the required Optional APIs used by this MIDlet suite in this
attribute. The exact names are determined by the individual optional API specifications.
Search WWH ::
Custom Search