Adding an icon to a MIDlet
m (Lpvalente -) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Adding missing translation link) |
||
| Line 72: | Line 72: | ||
* [[Jad & manifest entries/attributes]], for a list and description about possible manifest and JAD attributes. | * [[Jad & manifest entries/attributes]], for a list and description about possible manifest and JAD attributes. | ||
| + | <!-- Translation --> [[pt:Adicionando um ícone à MIDlet]] | ||
Latest revision as of 08:34, 18 September 2012
This code snippet demonstrates how to add an icon to a MIDlet.
Article Metadata
Tested with
Compatibility
Article
Contents |
Overview
This article demonstrates how to add an icon to a MIDlet.
manifest.mf
The manifest file provides information about the MIDlet. To add an icon to the MIDlet, add MIDlet-<n> attribute to the manifest file, where n is an integer identifying the MIDlet:
MIDlet-1: midletName,icon,mainClass
Here is a complete sample manifest:
MIDlet-Name: MIDgetSuite
MIDlet-Vendor: Vendor, Inc.
MIDlet-Version: 0.1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
MIDlet-1: MIDget,/icons/icon.png,MainEngine
JAD file
It is also possible to add information about the MIDlet into a so-called Java application descriptor file (JAD). JADs are useful because instead of downloading the whole – possibly large – JAR file, a MIDP device may first fetch the application's JAD file to provide the user information based on which he or she can decide whether the MIDlet is worth downloading. The JAD file is not required, and it does not directly relate to icons (most of the S60 devices ignore the icon definition), but here is an example of it:
MIDlet-Name: MIDgetSuite
MIDlet-Vendor: Vendor, Inc.
MIDlet-Version: 0.1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
MIDlet-Jar-Size: 2245
MIDlet-Jar-URL: MIDgetSuite.jar
MIDlet-1: MIDget,/icons/icon.png,MainEngine
Postconditions
After the MIDlet is packaged into a JAR file and installed into a device, the specified icon is shown.
See also
- Jad & manifest entries/attributes, for a list and description about possible manifest and JAD attributes.

