×
Namespaces

Variants
Actions
Revision as of 14:41, 8 December 2009 by dinanath.d (Talk | contribs)

How to add multiple midlets in manifest file

From Nokia Developer Wiki
Jump to: navigation, search

Contents

Overview

You may require more MIDlet(s) to your package and have the same on a device that supports MIDP. A typical Java Archive file (JAR) contains class files and resouces like images and application data. To do this you will have to create a JAR file.

A basic components of MIDlet Suite consists of Java Application Descriptor (JAD) file the Java Archive file (JAR).

Minimum fields in MIDlet suite's manifest

The manifest must contain at least the following fields:

MIDlet-Name @

MIDlet-Version @

MIDlet-Vendor @

MIDlet-# (where # is the MIDlet number, one for each MIDlet)

MicroEdition-Profile

MicroEdition-Configuration

@ Value must exactly match those present in the JAD file.

Minimum fields in JAD file

MIDlet-Name @

MIDlet-Version @

MIDlet-Vendor @

MIDlet-Jar-URL

MIDlet-Jar-Size

@ Value must exactly match those present in the manifest.

Sample manifest file for 2 midlets

MIDlet-Name: Games Demo
MIDlet-Version: 1.0
MIDlet-Vendor: GamesComp.
MIDlet-1: Demo Game1, , Simple.GameMidlet1
MIDlet-2: Demo Game2, , Advance.GameMidlet2
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1

Sample Java Descriptor file for 2 midlets

MIDlet-Name: Games Demo
MIDlet-Version: 1.0
MIDlet-Vendor: GamesComp
MIDlet-Description: Game Demostration
MIDlet-Jar-URL: GameDemo.jar
MIDlet-Jar-Size: 2548
MIDlet-1: Demo Game1, , Simple.GameMidlet1
MIDlet-2: Demo Game2, , Advance.GameMidlet2

Create the jar file

jar cvmf MANIFEST.MF GameDemo.jar Simple.GameMidlet1.class Advance.GameMidlet2.class
94 page views in the last 30 days.