MIDlet Messages allow you to deliver MIDlet suites to devices in a single package. Instead of delivering your MIDlet suite as separate JAD and JAR files, you can package the files in a single MIDlet Message, which mobile device users can then transfer to their devices.
MIDlet Messages are supported on S60 2nd Edition, Feature Pack
2 and newer Symbian devices. They can be delivered to devices through
the same delivery channels as MIDlet suites. The MIME type of a MIDlet
Message is application/java-archive
.
The MIDlet Message is a single uncompressed JAR file that contains the following files:
JAD file for the MIDlet suite
JAR file for the MIDlet suite
Manifest file
For the full MIDlet Message format specification, see document Implementation Best Practices for OMA DRM v1.0 protected MIDlets on Nokia Developer.
To create a MIDlet Message:
Create a new folder, and place the JAD and JAR files for the MIDlet suite in the root of the folder. For example:
D:\JavaME\ExampleMessage\suite.jad
D:\JavaME\ExampleMessage\suite.jar
In the above
folder, create the META-INF
subfolder for the manifest
file. For example:
D:\JavaME\ExampleMessage\META-INF\
In the META-INF
subfolder, create the manifest.mf
file. For example:
D:\JavaME\ExampleMessage\META-INF\manifest.mf
The manifest file is a simple text file that contains the following attributes:
Name |
Supported since platform |
Description |
Value |
---|---|---|---|
|
S60 2nd Edition FP 2 |
Specifies the version of the MIDlet Message. This is a mandatory attribute. |
The only supported value is
|
|
S60 2nd Edition FP 2 |
Specifies the name of the MIDlet suite JAD file inside the MIDlet Message JAR file. This is a mandatory attribute. |
Example:
|
|
S60 2nd Edition FP 2 |
Specifies the name of the MIDlet suite JAR file inside the MIDlet Message JAR file. This is a mandatory attribute. |
Example:
|
|
Java Runtime 2.1 for Symbian |
Specifies whether the MIDlet suite is installed as forward-locked. Forward-locked means that the MIDlet suite JAR file from the MIDlet Message is DRM-encrypted during installation. If this attribute
is set to This is an optional attribute. |
Possible values:
Example:
|
Here is the full contents of an example manifest.mf
file:
Distribution-Package: 1.0 Distribution-Descriptor-Filename: suite.jad Distribution-Content-Filename: suite.jar Nokia-Forward-Lock: true
Open the command
prompt, and create the MIDlet Message JAR file using the jar
command with the following syntax:
<JDK
installation path>\bin\jar cvf0M <message>.jar -C <message folder
path> .
For example:
C:\jdk\bin\jar cvf0M
examplemessage.jar -C D:\JavaME\ExampleMessage\ .