Skip Headers
Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.2 for Windows
  Go To Table Of Contents
Go To Index


2 Platforms

This chapter describes the Oracle Java ME SDK technology platforms, also called stacks. They are: CLDC with MIDP, IMP-NG and CDC, as discussed in Section 2.1, "Emulation Platforms".

A project runs on a particular emulation platform. The device manager determines whether a device is appropriate for your project based on the platform, the APIs your application uses, and a set of device properties. If you run an application and an appropriate emulator or device is currently running, the SDK automatically installs and runs your application in the current device so that you do not have to launch the emulator repeatedly.

2.1 Emulation Platforms

An emulator simulates the execution of an application on one or more target devices. An emulation platform enables you to understand the user experience for an application and test basic portability. For example, a platform enables you to run applications on several sample devices with different features, such as screen size, keyboard, runtime profile and other characteristics.

Oracle Java ME SDK provides the following emulation platforms:

All platforms include predefined devices with different screen sizes, runtime profiles, and input methods.

See Section 2.1.1, "CLDC with MIDP", Section 2.1.2, "IMP-NG" and Section 2.1.3, "CDC".

2.1.1 CLDC with MIDP

CLDC/MIDP applications conform to both the Connected Limited Device Configuration and the Mobile Information Device Profile ( The CLDC/MIDP stack supports the following technology.

CLDC/MIDP applications are targeted for devices that typically have the following capabilities:

  • A 16-bit or 32-bit processor with a clock speed of 16MHz or higher

  • At least 160 KB of non-volatile memory allocated for the CLDC libraries and virtual machine

  • At least 192 KB of total memory available for the Java platform

  • Low power consumption, often operating on battery power

  • Connectivity to some kind of network, often with a wireless, intermittent connection and limited bandwidth

Typical devices might be cellular phones, pagers, low-end personal organizers, and machine-to-machine equipment. In addition, CLDC can also be deployed in home appliances, TV set-top boxes, and point-of-sale terminals.

The SDK provides two default emulators to support CLDC:

  • ClamshellJavaMEPhone1

    A flip phone with a primary display and a secondary display.

  • JavaMEPhone1 and JavaMEPhone2

    A flat touch screen device.

These devices support CLDC 1.1, MIDP 2.1, and optional packages for JSRs 75, 82, 135, 172, 177, 179, 184, 205, 211, 226, 234, 239, 256, 257, and 280.

See Section 3.7, "Running MIDP and CLDC Sample Projects", Section 4.2.1, "Create a CLDC Project", Chapter 6, "Working With Devices".

2.1.2 IMP-NG

JSR 228 describes the Information Module Profile - Next Generation, referred to as IMP-NG. This JSR extends and enhances JSR 195: Information Module Profile.

The IMP-NG implementation depends upon CLDC 1.0. It is a strict subset of MIDP 2.0 that excludes MIDP 2.0 graphical display capabilities, resulting in a smaller footprint appropriate for Information Modules (IMs). Potential devices for CLDC with IMP-NG might be modems, home electronics devices, or industrial metering devices.

An IMP-NG application is an IMlet, and multiple IMlets in a single JAR file form an IMlet suite. When creating an IMlet project you follow the same process as that you use to create a Java ME Mobile Application project and select an IMP-NG device. The device selection determines the supported JSRs.

The IMP-NG stack supports the following JCP APIs: JSRs 75, 120, 172, 177, 179, 257, and 280. In addition, Oracle provides APIs to support IMP-NG development, as described in Section 16.2, "Oracle APIs".

The Java ME SDK implementation provides IMP-NG emulation, on-device tooling connectivity to real devices, and Attention (AT) Command support. The SDK emulator supports IMP-NG with IMPNGPhone1 and IMPNGPhone2 skins and provides simple interfaces for Inter-Integrated Circuit (I2C), Serial Peripheral Interface (SPI), General Purpose Input/Output (GPIO), and Memory-mapped I/O (MMIO) buses. The emulator's external event generator provides a way for you to inject calls to emulate AT Commands, alter basic pin and port information for GPIO, and memory block values.

See Section 3.8, "Running IMP-NG Sample Projects".

2.1.3 CDC

A Java ME Platform, Connected Device Configuration (CDC) ( application is an application targeted for network-connected consumer and embedded devices, including high-end mobile phones, smart communicators, high-end PDAs, and set-top boxes.

Devices that support CDC typically include a 32-bit microprocessor or controller and make about 2 MB of RAM and 2.5 MB of ROM available to the Java application environment.

CDC is based upon the open source project phoneME Advanced, found at A CDC application conforms to the Connected Device Configuration with a set of profiles that include Personal Basis Profile, Foundation Profile, and AGUI:

The SDK provides three default emulators to support CDC:

  • Default CdcPbpPhone1

    CDC 1.1, PBP 1.1, Foundation Profile (FP) 1.1

  • VgaAGUIPhone1

    CDC 1.1, PBP 1.1, FP 1.1 and AGUI 1.0

  • VgaCdcPhone1

    CDC 1.1, PBP 1.1, FP 1.1

See Table 3-2, "CDC Sample Projects", Section 4.1, "Project Types" and Section 6.3, "Viewing Device Properties".

2.2 Managing Java Platforms

To view the Java Platform Manager, select Tools > Java Platforms. Alternatively, right-click on a project, choose Properties from the context menu, select the Platform category, and select the Manage Emulators button to open the Java Platform Manager.

The Java Platform Manager is a tool for managing different versions of the Java Development Kit (JDK) and customizing Java platforms that your applications depend on. You can add source files and Javadoc documents to the existing platforms.

The Oracle Java ME SDK pre-registers CDC, CLDC/MIDP and Java SE (the JDK serves as the default platform) for version 3.2. These platforms have similar options:

Devices. (CLDC) View all the CLDC and IMP-NG devices that the Device Manager has discovered. Click Refresh to reconfigure the platform and refresh the list.

Classes. (CDC, Java SE) View the platform's classpaths. Add a JAR or folder containing additional classes. A class's location in the list determines its place in the classpath. Use the Move Up and Move Down buttons to change the class position.

Sources. Add JAR files or source files to the Sources tab to register source code.

Javadoc. Add Javadoc documentation to support any new classes or source files you have added.

See Section 2.2.1, "Java ME Platforms".

2.2.1 Java ME Platforms

In the Oracle Java ME SDK the platforms are embedded Java runtimes specifically for resource-constrained devices. Because the Netbeans Mobility pack is installed for Java ME you see the legacy 3.0.5 platforms coexisting with version 3.2 platforms and devices. Each platform has its own set of devices and optional packages.


If you cannot see the 3.2 devices in the Device Selector, choose Tools > Java ME > Active Device Manager and select Java(TM) ME Platform SDK 3.2.

Applications that worked in previous platform versions might not run on the current version, and vice versa. Follow these steps to set a project's platform options.

  1. Right-click on a project and choose Properties from the context menu.

  2. Select the Platform category. Be sure that the Emulator Platform is set to version 3.2.

  3. The device configuration should be automatically selected, but the Device Profile might not be explicitly selected. Be sure to choose a profile.

  4. Optional. Check any optional packages that are required to support the current project. (If this is an IMP-NG project you also see the Oracle APIs listed as optional packages. See Section 16.2, "Oracle APIs").

    Click OK.

  5. Rebuild the project and run.

2.2.2 Create a Platform for Legacy CDC Projects

The Oracle Java ME SDK version 3.2 platform name for CDC does not match the name in the legacy CDC toolkit and the CDC Mobility Pack. The legacy name is "Sun Java Toolkit 1.0 for Connected Device Configuration" while the SDK name is "CDC Oracle Java(TM) Platform Micro Edition SDK 3.2". To ensure a successful import, you can create a new platform and give it the legacy name.

The following procedure enables you to import legacy CDC projects without Reference errors (see Section 3.6, "Resolving Reference Problems").

  1. Select Tools > Java Platforms. Select "CDC Oracle Java(TM) Platform Micro Edition SDK 3.2", and in the Classes tab, note the libraries required for the platform.

  2. Click Add Platform... and click Next.

  3. Select Java ME CDC Platform Emulator and click Next.

  4. On the Choose Platform page, select the SDK installation directory. Click Next.

  5. On the Platform Name page, type "Sun Java Toolkit 1.0 for Connected Device Configuration" in the Name field. In the Sources tab, add the following libraries: agui.jar, cdc_1.1.jar, fp_1.1.jar, pbp_1.1.jar, and secop_1.0.jar.

    Click Finish, and Close.

See Section 4.2.5, "Import a Legacy CDC Project" and Section 3.6, "Resolving Reference Problems".