J2ME is a lean Java platform targeted specifically at applications running on small devices such as mobile phones, PDA's, digital television set top boxes, automotive entertainment and navigation systems etc. Technically speaking, J2ME is a set of extended Java APIs for the resource-constrained devices. The need for J2ME arises from the vast range of varieties in the paradigm of small and / or hand held devices. Typical J2ME devices range between the memory budgets of 128KB to 2MB with not more than 32_bit processor and limited display and the input facility.
The overall architecture of J2ME can be thought of as two parts: Configurations and Profiles.
Configurations - Configuration defines complete runtime environment for a horizontal category or grouping of devices. It is a set of APIs designed based on the memory availability for java environment and the processing power in the device. Configuration includes the provide support for java applications through built-in APIs and the respective virtual machine.
Profile - Built on top a specific configuration, a profile defines set of class libraries to fulfill the applications requirements such as life cycle, user interface and persistent storage etc. Profiles are meant to address the specific demands of certain vertical market segment.
Each java compliant device comes with its own virtual machine that is specifically optimized for supporting the target applications. Hotspot VM (HVM) is a highly tuned VM for boosting the performance of server-side applications of J2EE. JVM is the traditional Java Virtual Machine optimized for executing desktop applications of J2SE. Similarly, the two J2ME devices have their own virtual machines designed based on the available memory budgets with in the device, namely, Compact Virtual Machine (CVM) and the Kilo Virtual Machine (KVM). These are very compact in size and require much fewer system resources than the Hotspot VM and the JVM.
More about the architecture
Host OS is the operating system within the device. It could be anything such as Symbian, Palm OS, WinCE, Ericsson platform etc. and depends on the interests of the vendors.
Configurations
Configurations are set of APIs that define the runtime environment for the applications. These are designed based on the available memory budgets and the processing power of the device.
The wide range of varieties in J2ME compliant devices makes it easy to classify into 2 parts based on the available resources in the device.
Currently, two configurations are identified in J2ME:
1. The Connected Device Configuration (CDC)
- For devices ranging between 512KB to 2MB in memory and with a 32_bit processor
- Examples are navigation systems, set-top boxes etc.
2. The Connected Limited Device Configuration (CLDC)
- - For devices ranging between 128KB to 512KB in memory and with either a 16_bit or 32_bit processor.
- Examples are Mobile phones, PDAs etc.
Profiles
Profiles define additional set of API' and features for a particular vertical market and they are designed depending on the configuration used in the device.
The profiles for CLDC are:
- The MIDP (Mobile Information Device Profile) – provides application specific APIs for mobile handsets.
- The PDAP (Personal Digital Assistant Profile) - provides user interface and data storage APls for small and resource limited handholds powered by Palm as.
Optional Packages
These are the packages that are used for developing optional applications such as 3D games, multi media applications etc. (which are not mandatory in the mobile phones). The most commonly used optional packages are Mobile Media API (MMAPI) and Wireless Messaging API (WMA).
Mobile Media API (MMAPI)
The Mobile Media API extends the functionality of the J2ME platform by providing audio, video and other time-based multimedia support to resource-constrained devices. As a simple and lightweight optional package, it allows Java developers to gain access to native multimedia services available on a given device.
The Mobile Media API (MMAPI) provides a powerful, flexible, and simple interface to multimedia capabilities. It exposes a clean interface for playing and recording audio and video data. This article provides an overview of the concepts of the MMAPI and a quick tour of its classes and interfaces.
Wireless Messaging API (WMA)
The wireless messaging API is one of the optional packages for J2ME that provides platform independent access to wireless communication resources such as Short Messaging Service (SMS). The WMA is currently implemented on top of CLDC and MIDP.
(More about how the SMS works is discussed later)
The Java Community Process (JCP) is responsible for defining the Java programming language. Additions to Java are created formally by submitting a Java Specification Request (JSR). The JSR submission will either propose development of a new specification or significant revision to an existing specification.