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


Emulator Command Line Options

You can launch the emulator independent of the GUI using bin/emulator. The syntax is as follows:

emulator options
emulator Command
OS
Command
Windows
installdir\bin\emulator.exe
Mac OS
installdir/Contents/Resources/bin/device-address
To see this path, right-click the Java ME SDK 3.0 application and select Show Package Contents.
The general options are as follows:
-classpath path

-cp path

Specifies a search path for application classes. The path consists of directories, ZIP files, and JAR files separated by colons.
-Dproperty=value
Sets a system property value.
-help
Display a list of valid options.
-version
Display version information about the emulator.
-Xdevice:instance-name
Run an application on the emulator using the given device instance name.
-Xquery
Print emulator skin information on the standard output stream and exit immediately. The information includes the skin name, screen size, and other capabilities.

This is a simple example of running the emulator from the command line:

Windows

emulator.exe -Xdescriptor:C:\Java_ME_platform_SDK_3.0\apps\Games\dist\Games.jad

Mac OS

emulator -Xdescriptor:../apps/Games/dist/Games.jad

emulator also supports MIDlet Options, and Debugging and Tracing Options.

MIDlet Options

Options for running MIDlets in the emulator are as follows:

The Xjam argument runs an application remotely using the Application Management Software (AMS) to run OTA provisioning. If no application is specified with the argument, the graphical AMS is run.

This example illustrates OTA installation:

emulator -Xjam:install=http://www.myserver.com/apps/MyApp.jad          -Xdevice:DefaultCldcMsaPhone2

The above command returns the ID of the installed application. Once you obtain the ID you can run it with: emulator=Xjam:run=ID

See also Emulator Command Line Options and Debugging and Tracing Options.

Debugging and Tracing Options

You can use the following options with the emulator for debugging and tracing CLDC projects.

You can use the following options with the emulator for debugging and tracing CLDC and CDC projects.

Windows:

This example shows debugging :

emulator.exe -Xdevice:DefaultCldcMsaPhone2 -Xdebug -Xrunjdwp:transport=dt_socket, suspend=y,server=y,address=51307 -Xdescriptor:C:\Java_ME_platform_SDK_3.0\appps\Games\dist\Games.jad

See also MIDlet Options and Emulator Command Line Options.