Viewing and Editing Project Properties
Running Projects in the Emulator
Searching the WURFL Device Database
Finding Files in the Multiple User Environment
Manage Device Addresses (device-address)
Packaging a MIDLet Suite (JAR and JAD)
Command Line Security Features
Change the Default Protection Domain
Manage Certificates (MEKeyTool)
Running the Payment Console From the Command Line
Virtual Machine Memory Profiler (Java Heap Memory Observe Tool)
Run the Java Heap Memory Observe Tool
JSR 82: Bluetooth and OBEX Support
JSR 135: Mobile Media API Support
JSR 177: Smart Card Security (SATSA)
JSR 205: Wireless Messaging API (WMA) Support
JSR 211: Content Handler API (CHAPI)
JSR 226: Scalable 2D Vector Graphics
JSR 238: Mobile Internationalization API (MIA)
JSR 256: Mobile Sensor API Support
In the user interface, building a project is a single step. Behind the scenes, however, there are two steps. First, Java source files are compiled into Java class files. Next, the class files are preverified, which means they are prepared for the CLDC VM. See the following topics:
Before building and running an application from the command line, verify that you have a version no earlier than 1.5 of the Java SE software development kit. Make sure the jar command is in your path. To find the version of the development kit, run java -version at the command line.
Use the javac compiler from the Java SE development kit to compile Java source files. You can use the existing Java ME Platform SDK project directory structure. Use the -bootclasspath option to tell the compiler to use the MIDP APIs, and use the -d option to tell the compiler where to put the compiled class files.
The following example demonstrates how you might compile a MIDP 2.0 application, taking source files from the src directory and placing the class files in the tmpclasses directory. Newlines have been added for clarity.
javac -target 1.3 -source 1.3 -bootclasspath ../../lib/cldc_10.jar;../../lib/midp2.0.jar -d tmpclasses src/*.java
For more information on javac, consult the Java SE documentation.
The next step is to preverify the class files. The bin directory of the Java ME Platform SDK includes the preverify utility. The syntax for the preverify command is as follows:
preverify files | directoriesSome of the options are as follows:
|
Following the example for compiling, use the following command to verify the compiled class files. As before, newlines are added for clarity.
Mac
preverify -classpath ../../lib/cldc_10.jar;../../lib/midp2.0.jar -d classes tmpclassesAs a result of this command, preverified class files are placed in the classes directory. If your application uses WMA, MMAPI, or other versions of CLDC or MIDP, be sure to include the relevant .jar files in the classpath.