Pages

J2ME

Java ME was designed by Sun Microsystems and is a replacement for a similar technology, Personal Java. Originally developed under the Java Community Process as JSR 68, the different flavors of Java ME have evolved in separate JSRs. Sun provides a reference implementation of the specification, but has tended not to provide free binary implementations of its Java ME runtime environment for mobile devices, rather relying on third parties to provide their own. As of 22 December 2006, the Java ME source code is licensed under the GNU General Public License, and is released under the project name phone.

Java ME has become a popular option for creating games for cell phones, as they can be emulated on a PC during the development stage and easily uploaded to the phone. This contrasts with the difficulty of developing, testing, and loading games for other special gaming platforms such as those made by Nintendo, Sony, Microsoft, and others, as expensive system-specific hardware and kits are required.
Usage of Java ME
Java ME includes flexible user interfaces, robust security, built-in network protocols, and support for networked and offline applications that can be downloaded dynamically. Applications based on Java ME are portable across many devices; yet leverage each device?s native capabilities.
Java ME device as implement a profile, the most common of these are the Mobile Information Device Profile aimed at mobile devices, such as cell phones, and the Personal Profile aimed at consumer products and embedded devices like Set-top boxes and PDAs.
 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: Connented Limited 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.
 J2ME Architecture:
Architecture The Java ME Architecture comprises of three software layers:
The first layer is the configuration layer that includes the JVM, which directly interacts with the native OS. The Configuration layer also handles the interaction between the profile and the JVM.
The second layer is the profile layer, which consists of the minimum set of application programming interface (API) for the small devices.
The third layer is the Mobile Information Device profile (MIDP) layer. The MIDP layer contains java APIs for user network connections, persistence storage, and the user interface. It also has access to CLDC libraries and MIDP libraries.
MIDP
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 asMIDlets.
MIDP handles,
  •  Application life cycle managenent
  • User & Event interfaces
  • Network connectivity
  • Persistent storage