-d <output directory>
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. A manifest might have the following contents, for example:
MIDlet-1: My MIDlet, MyMIDlet.png, MyMIDlet
MIDlet-Vendor: My Organization
jar cfm <file> <manifest> -C <class_directory> . -C <resource_directory> .
like:jar cfm MyApp.jar MANIFEST.MF -C classes . -C res .
You can run the emulator from the command line. The J2ME Wireless Toolkit’s bin directory contains the command emulator. The syntax for the emulator command is as follows:
The general options are:
-help: Display a list of valid options.
-version: Display version information about the emulator.
-Xquery: Print emulator skin information on the standard output stream and exit immediately. The information includes the skin name, screen size, and other capabilities.
Options that pertain to running MIDlet suites are:
-Xdevice:<skin_name>: Run an application on the emulator using the given skin name. For a list of skin names, see Chapter 4, “Using the Emulator.”
-Xdescriptor:<jad_file>: Run an application locally using the given JAD file.
-classpath <classpath>: Specify the classpath for libraries required to run the application. Use this option when running an application locally.
-D <runtime_property>: Set the HTTP and HTTPS proxy servers. Valid properties include:
com.sun.midp.io.http.proxy=<proxy host>:<proxy port>
-Xjam:<command>=<application>: Run an application remotely using the Application Management System (AMS) to run using OTA provisioning. If no application is specified with the argument, the graphical AMS is run.
install=<jad_file_url> | force | list | storageNames|
Install the application with the specified JAD file onto a device.
run=[<storage_name> | <storage_number>]
Run a previously installed application. The application is specified by its valid storage name or storage number.
remove=[<storage_name> | <storage_number> | all]
Remove a previously installed application. The application is specified by its valid storage name or storage number. Specifying all, all previously installed applications are removed.
Install, run, and remove the application with the specified JAD file. Specifying transient causes the application to be installed and run and then removed three times.