Tuesday, February 26, 2008

RIM's Extensions to JAD Files

The JDE generated the following JAD file for the FirstApp project:

Manifest-Version: 1.0
MIDlet-Version: 0.0
MIDlet-Jar-Size: 1692
RIM-COD-Module-Dependencies: net_rim_os,net_rim_cldc
MicroEdition-Configuration: CLDC-1.0
MIDlet-Jar-URL: FirstApp.jar
RIM-MIDlet-Flags-1: 0
RIM-COD-Module-Name: FirstApp
MIDlet-Name: FirstApp
RIM-COD-Size: 1496
RIM-COD-Creation-Time: 1107707260
RIM-MIDlet-Position-1: 0
RIM-COD-URL: FirstApp.cod
RIM-MIDlet-NameResourceId-1: 0
MicroEdition-Profile: MIDP-1.0

As you can see, this .jad file includes both standard JAD properties and RIM-specific properties. It's a dual-purpose JAD, that supports downloading of MIDlets to BlackBerry devices, and to other devices as well. The properties RIM-COD-URL and MIDlet-Jar-URL ensure that BlackBerry users can download the .cod file, while users of other devices download the .jar.

Some of RIM's JAD properties are required, others are optional. Here are the required properties:

  • RIM-COD-Creation-Time: the time the .cod file was created
  • RIM-COD-Module-Dependencies: a list of modules the .cod file requires
  • RIM-COD-Module-Name: the name of the module contained in the .cod file
  • RIM-COD-SHA1: the SHA1 hash of the .cod file
  • RIM-COD-SIZE: the size of the .cod file, in bytes
  • RIM-COD-URL: the URL from which the .cod file can be downloaded

The optional properties are:

  • RIM-Library-Flags: reserved for use by RIM
  • RIM-MIDlet-Flags: reserved for use by RIM
  • RIM-MIDlet-NameResourceBundle: the name of the resource bundle the application depends on
  • RIM-MIDlet-Position: the suggested position of the application icon on the home screen

No comments: