Contents | Prev | Next
J2ME CDC 1.0 Beta
Porting Guide

Introduction

JavaTM 2 Platform, Micro Edition is the inner plumbing of Java technology on the Go!

The JavaTM 2 Platform, Micro Edition (J2ME) technology is designed and architected to address the needs of a broad range of consumer electronic and embedded devices. J2ME supports environments targeted at consumer products. It provudes a framework for effectively organizing categories of devices and specifying environments for the categories.

Architecture Overview

The J2ME architecture is based on two fundamental elements:

Together, a configuration and a profile deliver a specification for consumer electronics and embedded device manufactures to implement on their products. They provide a Java Application Environment to which third party developers can write their applications.

J2ME Configurations

Currently, J2ME offers two complementary configurations:

Both are derived through the Java Community Process and targeted at different ends of the consumer electronics and embedded devices industry.

CLDC Devices

The Connected, Limited Device Configuration (CLDC) is intended for lower-end devices. Typically, these devices are battery powered, run a 16- or 32-bit RISC/CISC microprocessor/controller, with as little as 160Kb - 512Kb of total memory; 128Kb for the storage of the K virtual machine and libraries.

CLDC contains the K virtual machine (KVM). The KVM is a new virtual machine designed from the ground up and optimized with the constraints of inexpensive, lower-end devices. Named to reflect that its size is measured in terms of kilobytes, the KVM is suitable for these resource-constrained devices.

CDC Devices

The Connected Device Configuration (CLDC) is intended for higher-end, emerging, next generation devices. Typically, these devices run a 32-bit microprocessor/controller and contain more than 2.0Mb of total memory for the storage of the C virtual machine and libraries.

CDC contains the C virtual machine (CVM). The CVM is a full-featured, Java 2 "Blue Book" virtual machine; designed for devices needing the functionality of the Java 2 VM feature set. The CVM APIs are a superset of the KVM

J2ME Profiles

Currently, the following industry-defined profiles are available.

Mobile Information Device Profile

The Mobile Information Device Profile (MIDp) is a set of Java APIs that provide a complete J2ME application runtime environment targeted at mobile information devices, such as cellular phones and two-way pagers. This allows new applications and services to be dynamically deployed on the end user devices. The MIDp specification addresses issues such as user interface (UI), persistence storage, networking, and appliation model.

Foundation Profile

The Foundation Profile (FNDp) is a set of Java APIs intended for higher-end devices requiring a custom user interface (UI), which is typically provided by a device manufacturer. FNDp is designed to run with the Connected Device Configuration (CDC).

Personal Profile

The J2ME Personal Profile provides the J2ME environment for those devices with a need for a high degree of Internet connectivity and Web fidelity.

A Java Community Process (JCP) expert group has been convened to create an industry-defined user interface (UI) profile. Tentatively, this is being called the Personal Profile. This profile works in combination with CDC and FNDp.

RMI Profile

The J2ME RMI Profile provides Java platform to Java platform remote method invocation for Java devices and interoperates with J2SE RMI.

CVM Feature Set

The C Virtual Machine (CVM) is the basis for J2ME CDC and profiles. Many JVMs for desktops and servers do not scale well to embedded and consumer environments.

CVM is a new VM implementation for consumer and embedded systems.

Optimized Interpreter

The CVM interpreter optimizes:

Fast Java Synchronization

The CVM uses light-weight locking if there is no contention. It uses just a couple of bits.

Native Thread Support

The CVM supports native threads and arbitrary thread pre-emption at machine instruction boundaries. It has proper internal synchronization, and handles exact garbage collection and Java synchronization correctly in the presence of pre-emptive native threading.

Memory System

The CVM memory system features the following:

ROMable Classes

The CVM runs with "pre-loaded", mostly read-only classes. This provides better start-up time, less fragmentation, more data sharing, and the ability to execute byte-codes out of ROM.

Small Class Footprint

The small class footprint reduces loaded and ROMized class footprints to a minimum, about 40% compared to JDK classic and 17% compared to Personal Java.

1.3 VM Support

CVM supports the 1.3 VM features and libraries, including weak references, reflection, serialization, JNI, and RMI.

Java 2 Security

CVM supports Java 2 security.

JPDA Support

The JPDA support consists of:

Portable

The CVM is implemented in C, with very little assembler.

Porting Layer

The CVM contains a rich, well-documented porting layer. It is RTOS-aware, supports multiple porting options (for the tricky stuff), and provides the bare minimum left to the porter for fast re-targeting.

Hardened System

The "hardened" system in low memory cases ensures that failures such as out of memory and out of file descriptors are handled gracefully.

Stack Usage

The CVM utilizes deterministic and limited stack usage.

Startup and Shutdown

The CVM provides ordered shutdown and re-startability.

Interfaces

The CVM provides extensible and well-defined interfaces.


Contents | Prev | Next
Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: jcp-cdc-comments@eng.sun.com
Sun