|
Read JAD File
by Jason Lam
To read values from the JAD file at runtime use the method getAppProperty from the Midlet class. For example a typical JAD file may contain the following:
MIDlet-1: HelloWorld, HelloWorld.png, HelloWorld
MIDlet-Jar-Size: 1092
MIDlet-Jar-URL: HelloWorld.jar
MIDlet-Name: HelloWorld
MIDlet-Permissions: javax.microedition.io.Connector.https
MIDlet-Vendor: JasonLam604
MIDlet-Version: 1.0.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.0
Say you wanted to display the current version in the application you would obtain it by using the following code::
String versionNumber = getAppProperty(MIDlet-Version);
|