CLDC
Article Metadata
Contents |
Overview
The Connected Limited Device Configuration (CLDC) defines the base set of application programming interfaces and a virtual machine for resource-constrained devices like mobile phones in Java ME.
Over CLDC usually exists MIDP 1.0 or MIDP 2.0. It was developed under the Java Community Process as JSR 30 (CLDC 1.0) and JSR 139 (CLDC 1.1).
The Virtual Machine installed on the phone for this configuration usually has 100-160Kb.
Limitations
CLDC 1.0 did not support any form of floating point arithmetic (float or double Java types). This limitation was removed in CLDC 1.1.
See How to use floating point numbers in CLDC 1.0
Packages included
- java.io
- java.lang
- java.util
Difference between CLDC 1.0 and CLDC 1.1
The list below summarizes the main differences between CLDC Specification versions 1.1 (JSR-139) and 1.0 (JSR-30):
- Floating point support.
- All floating point byte codes are supported by CLDC 1.1.
- Classes Float and Double have been added.
- Various methods have been added to the other library classes to handle floating point values.
- Weak reference support (small subset of the J2SE weak reference classes.)
- Redesigned, more J2SE-compliant Calendar/Date/TimeZone classes.
- Error handling requirements have been clarified, and one new error class, NoClassDefFoundError, has been added.
- Various minor library changes and bug fixes, such as the addition of the following fields and methods:
- Boolean.TRUE and Boolean.FALSE
- String.intern()
- Date.toString()
- Random.nextInt(int n)
- Minimum memory budget raised from 160 to 192 kilobytes, mainly because of the added floating point functionality.
- Specification text tightened and obsolete subsections removed.
- Much more detailed verifier specification ("CLDC Byte Code Typechecker Specification") is provided as an appendix.
Links
http://java.sun.com/products/cldc/
http://jcp.org/aboutJava/communityprocess/review/jsr139/index.html


26 Sep
2009
This article gives a useful brief overview of the differences between Connected Limited Device Configuration (CLDC) 1.0 and CLDC 1.1, which provide the core Java APIs which make up Java ME, which the MIDP classes are built on top of. CLDC 1.0 mainly exists on older devices now, but often times a midlet will still be required to run on both CLDC 1.0 and CLDC 1.1 compliant devices. As a result, programmers need to be aware of the differences between the two sets of classes.
The most significant difference, which this article points out well is that support for floating point data types float and double was only introduced in CLDC 1.1. As a result, for backwards compatibility to be achieved, a midlet must not use float or double data types. Fixed point mathematics libraries exist to overcome this shortcoming in CLDC 1.0. The differences in the Calendar and Date classes are also likely to impact a wide variety of applications which use these classes.
This article provides a useful overview of the changes introduced in CLDC 1.1. It is therefore useful reading for any programmer who needs to be aware of the changes between the two configurations, and is especially important if a midlet needs to run on older devices.