Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0, Mac OS

Get PDF Book Print View
 

Document Information

Getting Started

Features

Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Network Monitoring

Lightweight UI Toolkit

Security and MIDlet Signing

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator (Windows Only)

On-device Debugging

Command Line Reference

Launch the SDK

Run the Device Manager

Manage Device Addresses (device-address)

Emulator Command Line Options

Build a Project from the Command Line

Packaging a MIDLet Suite (JAR and JAD)

Command Line Security Features

Change the Default Protection Domain

Sign MIDlet Suites (jadtool)

Manage Certificates (MEKeyTool)

Generate Stubs (wscompile)

Virtual Machine Memory Profiler (Java Heap Memory Observe Tool)

Run the Java Heap Memory Observe Tool

Heap Snapshot Elements

Logs

JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSR 180: SIP Communications

JSR 184: Mobile 3D Graphics

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 226: Scalable 2D Vector Graphics

JSR 229: Payment API Support

JSR 238: Mobile Internationalization API (MIA)

JSR 256: Mobile Sensor API Support

Index


Packaging a MIDLet Suite (JAR and JAD)

To package a MIDlet suite manually you must create a manifest file, an application JAR file, and finally, a MIDlet descriptor (also known as a Java Application Descriptor or JAD).

Create a manifest file containing the appropriate attributes as specified in the MIDP specification. You can use any text editor to create the manifest file. For example, a manifest might have the following contents:

MIDlet-1: My MIDlet, MyMIDlet.png, MyMIDlet
MIDlet-Name: MyMIDlet
MIDlet-Vendor: My Organization
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1

Create a JAR file containing the manifest as well as the suite’s class and resource files. To create the JAR file, use the jar tool that comes with the Java SE software development kit. The syntax is as follows:

jar cfm file manifest -C class-directory . -C resource-directory .

The arguments are as follows:

For example, to create a JAR file named MyApp.jar whose classes are in the classes directory and resources are in the res directory, use the following command:

jar cfm MyApp.jar MANIFEST.MF -C classes . -C res .

Create a JAD file containing the appropriate attributes as specified in the MIDP specification. You can use any text editor to create the JAD file. This file must have the extension .jad.


Note - You must set the MIDlet-Jar-Size entry to the size of the JAR file created in the previous step.


For example, a JAD file might have the following contents:

MIDlet-Name: MyMIDlet
MIDlet-Vendor: My Organization
MIDlet-Version: 1.0
MIDlet-Jar-URL: MyApp.jar
MIDlet-Jar-Size: 24601