JammedUp – MIDlet Descriptor Updater Tool

2007-03-31

Introducing JammedUp, the MIDP and DoJa MIDlet descriptor updater.

>> Download JammedUp.zip <<

Introduction

MIDlets are typically separated into a JAR executable file and another file, the descriptor, which offers a brief but accurate description of the JAR file’s contents prior to download.

As JAR files are updated with each build there arises the need to also update the descriptor. Neglecting this step will result in MIDlets which cannot be installed to either an emulator or an actual J2ME-enabled device.

JammedUp (short for: JAM and JAD Update) is the tool which will automate this updating with each build of the JAR file. Since JammedUp runs on Java 1.4 it works on any Java capable host computer and has been localized to support the following languages:

· Brazilian Portuguese
· English
· French
· German
· Hebrew
· Japanese
· Simplified Chinese
· Spanish

How it Works

JammedUp updates, according to the specified options, the JAR size, the build date, and the build counter.

The update options are…
-b Updates the build counter
-d Updates the build date
-s Updates the JAR size

How to Execute

JammedUp can be executed 3 ways. For manual execution one need only to execute the following command…

java -jar JammedUp.jar descriptor.jad midlet.jar -b -d -s

(where descriptor.jad and midlet.jar are replaced by your project’s filenames, if for DoJa substitute jad with jam)

This command can be issued by a shell script as shown above but if the ANT build tool is used the following target should be integrated into your project’s build.xml file.

<target name="jammedup" depends="preverify" description="Update descriptor">
    <exec dir="${dist.home}" executable="java">
        <arg line="-cp %CLASSPATH%;.;.. -jar JammedUp.jar helloworld.jad helloworld.jar -b -d -s"/>
    </exec>
</target>

Lastly, if you have a customized build system that is built in Java you can leverage the classes in the JammedUp.jar from your application as demonstrated in the code below.

JammedUp ju = new JammedUp();

try {
    // Call JammedUp
    ju.execute(descriptorFilename, jarFilename,
        isDojaDescriptor, updatesSize, updatesBuild,
        updatesDate, null);
} catch (JammedUpException jue) {
    // An exception occured!
    System.out.println(jue.getMessage());
}

Call for assistance

JammedUp needs localizations. If you natively speak a language that has not been listed and would like to have your contribution mentioned in the product please contact me at the address below…

    j a y _ f u e r s t e n b e r g [AT MARK] y a h o o . c o . j p

Entry Filed under: tools. .

3 Comments

Trackback this post


Recent Posts

a

Feeds

Blogroll