Sun Java Solaris Communities My SDN Account Join SDN
 
Article

Summary of CLDC-Based Profiles

 
By C. Enrique Ortiz, June 22, 2006  

The Connected Limited Device Configuration (CLDC) is the predominant configuration of the Java Platform, Micro Edition (Java ME), found on most mobile handsets today. The CLDC defines a subset of the standard core Java packages familiar to Standard Edition developers, and adds classes tailored for devices with limited resources. In addition, CLDC has introduced the streamlined Generic Connection Framework (GCF) package, javax.microedition.io, to support network connectivity and I/O in devices that lack the memory to use the larger java.net and java.io packages.

Configurations provide basic application services, but no classes for managing the application life-cycle, for driving the user interface, for maintaining and updating persistent data in the device, or for secure access to information stored on a network server. These types of functionality are provided by profiles, or by optional packages. A profile adds domain-specific classes to the core set provided by the configuration, classes that are geared towards specific uses of devices and provide functionality missing from the underlying configuration. Optional packages add specialized services that are useful on devices of many kinds, but that are not necessarily available on all of them.

To take fullest advantage of the Java ME platform, developers base their applications on a configuration appropriate to the desired category of target devices, a profile that supports the application's basic functionality, and optional packages that support needed specialized functions like messaging or multimedia.

Of the profiles designed for CLDC, the Mobile Information Device Profile (MIDP) is the most prevalent. MIDP 2.0 has superseded MIDP 1.0 in capability, but many devices still support only MIDP 1.0, so most developers can't afford to ignore the older version. At the time of this writing, MIDP 3.0 is being defined in the Java Community Process (JCP). In addition, the new Information Module Profile (IMP) promises to do for "headless devices" such as vending machines, industrial devices, and security systems what MIDP has done for smart cell phones and low-end PDAs. There are two versions of IMP; version 1.0 is based on MIDP 1.0, and the Next Generation (NG) version is based on MIDP 2.0. The next table summarizes the device requirements for MIDP and IMP.

Requirement
Profile
 
MIDP 1.0
MIDP 2.0
IMP 1.0
IMP-NG
Display
Screen size
96x54
Same as MIDP 1.0
N/A
N/A
 
Depth
1 bit
Same as MIDP 1.0
N/A
N/A
 
Aspect ratio
1:1
Same as MIDP 1.0
N/A
N/A
Input
 
One or two-handed keyboard, or touch screen
Same as MIDP 1.0
N/A
N/A
Memory
Non-volatile, in addition to what CLDC requires
128KB
256KB
128KB
128KB
 
Non-volatile memory for application-created persistent data
8KB
8KB
8KB
8KB
 
Volatile memory for the Java runtime
32KB
128KB
32KB
128KB
Networking
 
2-way, wireless, possibly intermittent, with limited bandwidth
Same
Same
Same
Power
Limited, possibly battery-operated
Same
Same
Same
Sound
 
None
Play tones, either via dedicated hardware, or via software algorithm
None
Play tones, either via dedicated hardware, or via software algorithm
 

The next table summarizes the packages available in MIDP and IMP.

Name
Description
MIDP 1.0
MIDP 2.0
IMP 1.0
IMP-NG
java.lang
MIDP subset of the core Java programming language
X
X
X
X
java.util
Small subset of utility classes
X
X
X
X
java.io
MIDP subset of system input and output through data streams
X
X
X
X
javax.microedition.io
Networking support using the Generic Connection Framework; includes new socket, UDP, serial, and secure connection types, and push functionality
X
X
X
X
javax.microedition.lcdui
MIDP classes for user interface
X
X
 
 
javax.microedition.lcdui.game
Gaming classes such as sprites, game canvas, and layer manager
 
X
 
 
javax.microedition.media
Interfaces for controlling (Control) and rendering (Player) audio - sound classes compatible with the Mobile Media API specification (JSR 135)
 
X
 
X
javax.microedition.media.control
Sound-control classes (ToneControl and VolumeControl) - compatible with the Mobile Media API specification (JSR 135)
 
X
 
X
javax.microedition.midlet
The application interface, its life-cycle classes, and its interactions with the runtime environment and the application manager
X
X
X
X
javax.microedition.pki
Public key class for certificates used to authenticate information for secure connections
 
X
 
X
javax.microedition.rms
Classes for storing and retrieving persistent data
X
X
X
X
 

In addition to configurations like CLDC and profiles like MIDP, the JCP has defined a more comprehensive specification for developing applications for mobile handsets, called Java Technology for the Wireless Industry (JTWI). Adopted by all major handset manufacturers, JTWI defines a common architecture and programming interface for wireless handsets based on these specifications:

  • CLDC 1.0 (JSR 30)
  • CLDC 1.1 (JSR 139)
  • MIDP 2.0 (JSR 118)
  • The Wireless Messaging API (WMA, JSR 120)
  • The Mobile Media API (MMAPI, JSR 135)

JTWI enforces CLDC 1.0 as the minimum required configuration, and mandates the inclusion of MIDP 2.0 and Wireless Messaging API 1.1. In addition, it conditionally requires the inclusion of the Mobile Media API 1.1. By defining a common runtime and APIs, and an associated technology compatibility kit (TCK), JTWI ensures a consistent environment that enables applications to interoperate across device platforms.

At this writing a new architecture for mobility software is being developed that will incorporate and supersede JTWI. The Mobile Service Architecture (MSA) for CLDC, JSR 248, defines a common runtime and APIs to ensure a consistent application environment as JTWI does, but also takes into consideration all the latest applicable Java ME JSRs. The result will be the most comprehensive Java mobility environment ever defined for cell phones and other handsets.

For more information on the profiles based on CLDC, read the articles "What's New in MIDP 2.0" and "The Information Module Profile." For more information on the state of J2ME today read the article "A Survey of J2ME Today." To learn more about JTWI see the article "Understanding JSR 185."," and to learn more about MSA see "Java ME Luminary: Asko Komsi of Nokia."

Up to this point I've focused on CLDC-based profiles designed for mobile and headless embedded devices. Use of CLDC is not restricted to such devices, however. The Digital Set Top Box Profile (JSR 242) is a CLDC 1.0-based profile specifically defined for the cable market. Also referred to as OnRamp, this profile is based on a subset of the Personal Java-based OpenCable Application Platform (OCAP), which defines a set of APIs for the development of applications for set-top boxes and similar devices. The OnRamp subset consists of subsets from the Personal Basis Profile (PBP), including support for the Abstract Window Toolkit, Xlet, file access, and network APIs, as well as for several media-related interfaces: Java TV, Java Media Framework (JMF), Digital Audio Visual Council (DAVIC), Home Audio/Video Interoperability (HAVI), Digital Video Broadcasting (DVB), and OpenCable Application Platform (OCAP). OnRamp is pretty massive, with 31 Java packages and approximately 1500 APIs - but not as large as its superset OCAP, which has approximately 8000 APIs.

Resources
About the Author

C. Enrique Ortiz is a software architect and developer, and a wireless technologist and writer. He has been author or co-author of many publications, and is an active participant in the Java mobility community. Enrique holds a B.S. in Computer Science from the University of Puerto Rico and has more than 15 years of software engineering, product development, and management experience.

Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.