JavaTM applications that run on MIDP devices are called MIDlets. MIDlets are portable across compatible mobile devices that support the same optional APIs that the MIDlet itself uses.
In order to be classified as a MIDlet, a mobile Java application must:
extend the MIDP-defined abstract class javax.microedition.midlet.MIDlet,
which controls the MIDlet
lifecycle.
be packaged and distributed in a Java ARchive (JAR) file.
include a MANIFEST.MF file
contained within the .jar file.
include a Java Application Descriptor (JAD) file.
have all .class files preverified before
deployment. In current Java ME tools, the preverification is done automatically
during the build process. For more information, see section Differences
between Java ME and Java SE.
MIDlets are designed to support a particular MIDP version and are guaranteed to work properly with mobile devices that support that version. MIDlets may also utilize features from optional APIs, which may not be supported by the mobile device. In these cases, the optional API functionality is not supported. When a MIDlet meets the requirements of the list above and is compliant with the MIDP version and optional APIs that the mobile device uses, it can be installed and executed on that mobile device correctly. The installation, uninstallation and runtime actions are handled by the Application Management Software (AMS) at that point. For more information, see sections MIDlet life cycle and Deploying MIDlets to a device.
A MIDlet suite is a collection of one or more MIDlets in a single JAR file so that they have greater ability to share external resources than separate MIDlets. All of the MIDlets in a suite are installed onto a device as a single entity. At runtime, if the device supports concurrent running of more than one MIDlet, all active MIDlets from a MIDlet suite run in the same Java VM. All MIDlets in the same suite therefore share the same instances of all Java classes and other resources loaded into the Java VM. This practically means that data can be shared between MIDlets and that the usual Java synchronization primitives can be used to protect against concurrent access.
A MIDlet can not be launched from another MIDlet and a MIDlet suite can not launch another MIDlet suite. In addition, no resources can be shared between MIDlets in different suites. Persistent data using shared Record Management System (RMS) is accessible to different MIDlet suites.
MIDlets are defined as part of a MIDlet suite in the application descriptor
file (JAD) by using the MIDlet-<n> attribute. The
application descriptor is also used for holding configurable application properties
of a MIDlet suite. For detailed information on the use of the application
descriptor and mandatory or optional attributes, see section Packaging MIDlets.