Java Reference
In-Depth Information
Furthermore, for a given configuration there can be variations called profiles that
add classes to perform specific tasks such as networking over a wireless connec-
tion. J2ME aims to assure developers that if a program runs on one platform that
adheres to a given configuration and profile, it will run on all of them.
Note that smart cards with microprocessors provide so little memory (typically
16 KB of ROM, 8 KB of EEPROM and 512 bytes RAM) that they lie outside the
J2ME framework. The Java Card API involves a basic JVM that can run Java
applets (Java Card applets extend the javacard.framework.Applet class,
not java.applet.Applet ) that use classes from four Java Card packages [1].
24.3.1 J2ME configurations
The two currently developed configurations include:
Connected Limited Device Configuration (CLDC) - this configuration is intended
for systems with memory resources in the range of 160-512 KB such as cell phones and
low-end PDAs. As of mid-2004, there are two versions - CLDC 1.0 and CLDC 1.1. The
1.0 version involves only four packages: java.lang , java.io , java.util , and
javax.microedition.io ,while version 1.1 added the package java.lang.ref .
Version 1.1 also added floating-point operations and a few other enhancements and
needs a minimum of 192 KB versus 160 KB for the 1.0 version.
Connected Device Configuration (CDC) - this configuration is intended for systems
with around 2 MB or more memory such as smart phones and set-top boxes. It includes
13 packages.
Other configurations may be released and all must follow the guidelines that
require the use of J2SE classes if possible and no new classes for a core language
package such as java.lang . They also cannot modify the method signatures
or fields in the core language classes or add new methods and fields. So a J2ME
program that uses only core language classes should also compile and run under
J2SE.
For each of these configurations there exists a reference virtual machine. (Third
parties are free to develop their own JVMs for these configurations as long as
they perform according to specifications.) The KVM (the K Virtual Machine)
is the reference JVM for the CLDC [3]. It takes up a small amount of memory
and uses a garbage collector especially designed to run efficiently in a memory-
limited environment. Usually it is implemented with the core classes prelinked .
That means that essentially a memory image of a running KVM is burned into
ROMsothat at start-up the KVM begins running immediately without the need
to load classes.
KVM version 1.1 supports floating-point and other enhancements for
CLDC 1.1. Sun also offers its own CLDC Hotspot TM Implementation JVM that
provides up to a factor of ten faster performance than the KVM. Like the Hotspot
Search WWH ::




Custom Search