Java Runtime Environment in Mobile devices

What is J2ME?

J2ME is a subset of Java SE (with limited set of APIs) and is the Java platform for the mobile & embedded devices. J2ME is defined thru the JCP (Java Community Process) and keeps the promise, “portability”. In J2ME, portability is achieved by dividing the targeted devices into different “configurations”.

CDC: Connected Device Configuration
CLDC: Commented Limited Device Configuration (rather I would say Limited Connected Device Configuration)

These configurations comes with their own virtual machines and class libraries to provide the basic set of functionalities to the devices with corresponding configuration.

CDC comes with a CVM (Compact Virtual Machine) and can support devices with minimum of 2MB of memory and a 32 bit processor. On the other hand, CLDC comes with KVM (K -KiloByte- Virtual Machine) which can support low-end devices with limited memory (128 – 512 KB) and a slower processor (16 or 32 bit). So we can conclude that CLDC is smaller of two configurations.

What is MIDP then ?

MIDP (Mobile Information Device Profile) is the J2ME development environment in the CLDC devices. MIDP provides the class libraries for UI, Persistent storage, network & application management. Combined with CLDC and its KVM, MIDP provides the complete Java runtime environment for devices with limited memory and processor power. This JRE allows applications to be downloaded OTA (Over The Air) from various sources as MIDlets.

MIDP handles,

  • Application life cycle management
  • User & Event interfaces
  • Network connectivity
  • Persistent storage