Tuesday, June 10, 2008

Java 2 Micro Edition - Configurations

Configurations define the basic run-time environment as a set of core classes. They add the classes required for the program to be compatible with the virtual machine.

J2ME has two main configurations – Connected Limited Device Configuration (CLDC) and Connected Device Configuration (CDC). These configurations actually specify the main type of the device, which defines how much memory is available for the operations to be performed.

CLDC requires less memory whereas CDC requires at least 2MB of memory to perform its computations. The CLDC configuration consists of classes and a set of libraries more specific to the mobile devices. The CDC configuration is basically a stripped down version of J2SE with the CLDC classes added to this.

The CLDC configuration is supported by KVM and the CDC configuration is supported by CVM. Configurations decide whether optional features such as multi dimensional arrays, threads, JNI and others have to be included or not.

CLDC configuration is used when the memory available is low, such as the case of PDAs and cell phones. CDC configuration is used when the memory available is more than 2MB but less than that available on our computers, such as the case of set-top boxes.

No comments: