Java

Java ME Architecture
Technical Docs Feb 11, 2009
0

About This Article

This article will cover in brief about the Java ME Architecture, explaining the building blocks of Java ME.


Scope:

This article is intended for novice users who want to know about Java ME Architecture.


Reference:

1. Java ME: 

http://java.sun.com/javame/technology/index.jsp


2. Mobility Article:

http://developers.sun.com/mobility/midp/articles/optional/ 


Abbreviations:

J2EE  Java 2 Platform ,Enterprise Edition
J2SE  Java 2 Standard Edition.
MIDP  Mobile Information Device Profile
MIDP_NG MIDP Next Generation
CLDC  Connected Limited Device Configuration
JVM  Java Virtual Machine
KVM   Kilobyte Virtual Machine
API  Application Programming Interface
OTA  Over The Air


Introduction

Sun Microsystems has classified Java platform into three editions:


  •Java 2 Platform, Enterprise Edition (J2EE)
  •Java 2 Platform, Standard Edition (J2SE)
  •Java 2 Platform, Micro Edition (Java ME)



Java Micro Edition (Java ME) is an application platform to use Java technologies on resource-constrained embedded devices like  Mobile Phones, PDAs, Palmtops etc. It is a minimalist version of Java, targeted at devices, which have limited processing power, storage capabilities and intermittent or low-bandwidth network connections.



Overview

The Java ME architecture is generally classified into 3 layers:


  •Java Virtual Machine
  •Configuration
  •Profile



Java Virtual Machine is an interpreter and provides the runtime environment for Java applications. Java source code is compiled into a format called "bytecode"  which is executed by Java Virtual Machine.


Configuration is a minimal set of core class libraries that provides the basic functionality for a particular range of devices.

Profile is an extension of the configuration that addresses the specific demands of a device family.


Figure 1 shows Java ME components and other Java Technologies.
 


Figure 2 explains the various components that comprise Java ME Architecture.
 


Configuration

Configuration provides the most basic set of libraries and limited Java Virtual Machine capabilities for Java ME devices.


Kilobytes Virtual Machine (KVM)

Kilobytes Virtual Machine (KVM) is a compact, portable Java Virtual Machine designed for resource-constrained devices. These devices typically contain 16 or 32 bit processors and a minimum memory footprint of approximately 128 kilobytes. KVM maintains all the aspects of the Java programming language, and runs in a resource-constrained device with only a few hundred kilobytes of total memory budget.


Connected Limited Device Configuration (CLDC)

CLDC is designed for mobile devices. This configuration typically has the following features.  


  •160 – 512K of memory available for Java.
  •Typically has limited power or battery operated.
  •Network connectivity, often wireless, intermittent, low-bandwidth.
  •Core Java class libraries available on a particular category of devices. 
  •32 kilobytes memory for runtime memory allocation.



Profile

Profile adds domain-specific classes and helps to create interactive applications. The most popular profile is Mobile Information Device Profile (MIDP). Currently MIDP 1.0, MIDP 2.0 & 2.1 are the versions of MIDP. There are number of profiles available such as Foundation Profile, Personal Basis, Personal and RMI profiles each having its specific features and target devices.


Mobile Information Device Profile (MIDP)

MIDP is set of Java APIs and it is more domain specific than the class libraries of CLDC. This addresses the user to persistence storage, networking and user interface where the prime focus is on the guaranteed interoperability within certain devices family. One of the core features of the Mobile Information Device Profile (MIDP) technology is its support for developing user interfaces.


Mobile Information Device has the following specifications:

The primary focus of the MIDP_NG specification scope will address


  •Backward compatibility with MIDP 1.0 
  •Continued focus on small, high-volume wireless phones •Maintain tight footprint objectives to limit growth in the core APIs
  •Information learned from MIDP 1.0 deployments to fine tune MIDP 1.0 APIs
  •Focus on core functions needed by all devices and applications
  •Focus on enabling mCommerce, service-based applications



Optional Packages

Optional Packages are nothing but the bunch of Java Classes, which extend the core platform. These Java Classes can be packaged with configurations and profiles to create software pack. Optional package has the functionality, which is independent of any particular device family. It is a set of APIs that is most of the time layered on top of (and thus extends) a profile. It allows the definition of APIs, which can add flexibility on top of other profiles.


Configuration and profiles extend the runtime environment to support device capabilities that are not universal enough to be defined as part of a profile or that need to be shared by different profiles.


Java ME supports number of optional packages. Some of them are listed below:


- Wireless Messaging API (WMA), JSR 120, JSR 205

- Mobile Media API (MMAPI), JSR 135, JSR 234

- Location API for Java ME, JSR 179

- SIP API for Java ME, JSR 180

- Security and Trust Services API (SATSA), JSR 177

- Mobile 3D Graphics, JSR 184

- Web Services APIs (WSA), JSR 172

- Bluetooth API, JSR 82



MIDlet

MIDlet is a MID Profile application. Application should extend the MIDlet class to get the Application Management Software (AMS) to control the MIDlet and to be able to retrieve properties from the application descriptor, notify and request the state change. Application management software manages the activities of multiple MIDlets within a runtime environment using these states.


MIDlet has three methods which user must override. They are:


startApp()
pauseApp()
destroyApp (boolean)

With the help of this class method, Application Management Software can create and control the start, pause and can also destroy a MIDlet.



Downloads

This article can also be downloaded in Word Document and PDF format . Click on the following link to download:

Java ME Architecture Download
 

Revision history
REVISION HISTORY DATE
First update Feb 11, 2009
go to top