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

Previous
Previous
 
Next
Next
 

2 Platforms

The Java ME SDK supports two technology platforms, also called stacks. They are: Section 2.1.1, "CLDC and MIDP Stack", and Section 2.1.2, "CDC Stacks", 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 already running, the SDK automatically installs and runs your application. You don't have to launch the emulator over and over.

On all operating system platforms, you can use the SDK to deploy to a real device using a wireless connection.

2.1 Emulation Platforms

An emulator simulates the execution of an application on one or more target devices. An emulation platform allows 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.

Java ME SDK provides three well-known emulation platforms: Connected Limited Device Configuration (CLDC) with MIDP, Connected Device Configuration (CDC) with AGUI, and CDC with Personal Basis Profile (PBP). All three platforms include predefined devices with different screen sizes, runtime profiles, and input methods. See Section 2.1.1, "CLDC and MIDP Stack" and Section 2.1.2, "CDC Stacks".

2.1.1 CLDC and MIDP Stack

CLDC/MIDP applications conform to both the Connected Limited Device Configuration and Mobile Information Device Profile (MIDP - http://jcp.org/en/jsr/detail?id=139). The CLDC/MIDP stack is based on the open source phoneME Feature project at http://java.net/projects/phoneme. It supports these technologies:

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 four default emulators to support CLDC:

  • ClamshellCldcPhone1

    CLDC 1.1, MIDP 2.1, MSA 1.1 and extensions for 256, 280, 239 and 229

  • DefaultCldcJtwiPhone1 and 2

    CLDC 1.1, MIDP 2.0, JTWI 1.0

  • DefaultCldcMsaPhone1 and 2

    CLDC 1.1, MIDP 2.1, MSA 1.1

  • DefaultCldcPhone1, 2, and 3

    CLDC 1.1, MIDP 2.1, MSA 1.1 and extensions for 256, 239 and 229

See Section 4.2.8, "Create a CLDC Project" and Chapter 6, "Running Projects in the Emulator".

2.1.2 CDC Stacks

A Java ME Platform, Connected Device Configuration (CDC) (http://jcp.org/en/jsr/detail?id=218) 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 http://java.net/projects/phoneme. 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 Section 4.1, "Project Types" and Section 6.2, "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 Platform, and select the Manage Emulators button.

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. For Java ME purposes, the platforms are emulators or SDK platforms for mobile devices.

The Java ME SDK pre-registers CDC, J2ME (CLDC and MIDP) and Java SE (the JDK serves as the default platform) for version 3.0.5. Because the Mobility pack is also installed the current Oracle platforms coexist with the legacy Java platforms.

See Section 2.2.1, "Java ME Platforms (CLDC and MIDP)" and Section 2.2.2, "Java SE and CDC Platforms".

2.2.1 Java ME Platforms (CLDC and MIDP)

To view the Java Platform Manager, select Tools > Java Platforms. The Java ME platform supports CLDC projects. Tabs display the following information for the current platform.

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

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 sources files you have added.

Tools & Extensions. View the tools and extensions for this platform.

2.2.2 Java SE and CDC Platforms

To view the Java Platform Manager, select Tools > Java Platforms. The Java SE platform supports the Java ME SDK. The CDC platform supports the CDC Stack. In the standard Java ME SDK installation the Java SE and CDC platforms have the same options:

Classes. View the platform's classpaths. Add a JAR or folder containing additional classes, moving the classes up and down in the list determines their place in the classpath.

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 sources files you have added.

See Section 2.1.2, "CDC Stacks".

2.2.3 Create a Platform for Legacy CDC Projects

The Java ME SDK version 3.0.5 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.0.5". To ensure a successful import, you can create a new platform and give it the legacy name.

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

  1. Select Tools > Java Platforms. Select "CDC Oracle Java(TM) Platform Micro Edition SDK 3.0.5", 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.5.2, "Import a Legacy CDC Project" and Section 3.5, "Resolving Reference Problems".