Oracle® Java Micro Edition Software Development Kit Developer's Guide Release 3.3 for Eclipse on Windows E37550-03 |
|
Previous |
Next |
Beta Draft: 2013-06-06
The Java ME SDK provides supporting tools and sample implementations for the latest in Java ME technology. It supports recent versions of the Connected Limited Device Configuration (CLDC), Information Module Profile - Next Generation (IMP-NG), and Connected Device Configuration (CDC) platforms.
As of version 3.3, the Java ME SDK is a plugin to the Eclipse IDE.
The Oracle Java ME SDK plugin uses Eclipse technology, as described in the Eclipse online help. These tips offer some hints for getting started as quickly as possible.
Access the documentation. The online help is the primary documentation for the SDK. Many windows and dialogs feature a help button that opens context-sensitive help in the help viewer. You can also type F1.
Click the Help menu and select Help Contents to open the Eclipse Online Help viewer. Remember to use the search capability to help you find topics.
Run sample projects. Running sample projects is a good way to become familiar with the SDK.
See "Running a Project" for a general overview of how to run a project.
The Oracle Java ME SDK has two components.
The Oracle Java ME SDK platform software installation includes the supported runtimes, emulation software, device configurations, supporting libraries, documentation (including Javadocs), the command line interface, and other utility executables. The default location of the SDK, as specified by its installer, is:
C:\Java_ME_platform_SDK_3.3
The Oracle Java ME SDK plugins for Eclipse add Oracle Java ME SDK technology to an Eclipse IDE installation running Mobile Tools for Java (MTJ). The outstanding feature of Oracle Java ME SDK is device emulation for the Connected Device Limited Configuration (CLDC). If the plugin is properly installed you will see the Device Selector tab on the bottom left, or, if it is not visible you can select Window > Show View > Device Selector.
The SDK provides two unique instances for most devices. For example, JavaMEPhone1 and JavaMEPhone2 are the same except for the device number and the phone number, so you can perform tests that require two devices (messaging, for example) without customization.
If the plugin is installed, and you cannot see the device selector you can add the Java ME SDK devices manually.
Select Window > Open Perspective > Other > Java ME and click OK.
Go to Window > Preferences > Java ME > Device Management and click on Manual Install.
In the Specify Search Directory field, insert the path to the Java ME SDK platform installation directory, and press Enter. The devices appear on the Devices table. Click on Finish and then click on OK. The device selector opens.
See the Package Explorer window and the Navigator window for a visual overview of the logical and physical layout of a project. When viewing items in the tree, use the context menu (right-click) to see the available actions.
A project has a default device that is used when it is run from the toolbar by clicking the green arrow or going to the Run menu and choosing Run.
To see a project's default device, expand the project node and double-click the Application Descriptor subnode. The project's Overview tab opens in the central editing area. The Runtime table on the bottom right of the Application Descriptor panel lists devices (execution environments) for the current project. The checked device will be used when the project is run. You can easily add, modify, or remove a device.
To run an application on different devices without changing the default device, right-click a device in the Device Selector pane, then select Run Project and choose an open project.
The emulator is an independent process, and when it has started it is a separate process from the build process running in Eclipse. Stopping the build process or closing a project does not always affect the application running in the emulator. You must be sure to terminate the application (the emulator can remain open). See "Running a Project."
The Java ME SDK Update Center supports automatic updating of the entire Java ME SDK plugin, and individual modules within the Java ME SDK. To access the update center, click the Help menu and select Java ME SDK Update Center. The update manager works separately from the Eclipse Check for Updates function so that the Java ME SDK plugin components, including the Update Center, can be updated independently.
Oracle Java ME SDK is delivered as two plugin bundles in a category named Java ME SDK Tools. The plugin bundles are:
Java ME SDK Tools
Java ME SDK Demos
To detect updates, click the Help menu and select Java ME SDK Update Center and choose the Available tab. Any available updates are listed. Select an update and click Install to update the plugin. The plugins then appear as activated on the Installed tab.
Demos are delivered separately for two reasons:
Some demos use network access for test purposes, however, the sample code does not include protection against malicious intrusion. Before using the demos, see the "Installation and Runtime Security Guidelines" in the Oracle Java Micro Edition Software Development Kit Release Notes.
Sample code has a different copyright that allows you to redistribute provided the Oracle copyright is kept.
For more on sample applications, see Chapter 4, "Using Sample Projects."