Java

Basics of Java ME
Technical Docs Feb 11, 2009
1

Version 0.9, Draft




 

About This Article

This article will cover in brief about the basics of Java ME, and explains the building blocks of MIDP Platform. This article explains different Profiles, Configuration of Java ME.


 

Scope:

This article is for novice users who want to know about the basics of Java ME. It explains about most popular CLDC configuration and MIDP Profiles.


 

References:

 

Java ME Platform Specification

http://jcp.org/en/jsr/detail?id=68
JavaME Technology  http://java.sun.com/javame/technology/index.jsp
CLDC 1.0  http://www.jcp.org/en/jsr/detail?id=30
CLDC 1.1 http://www.jcp.org/en/jsr/detail?id=139
MIDP 1.0 http://www.jcp.org/en/jsr/detail?id=37
MIDP 2.0 http://www.jcp.org/en/jsr/detail?id=118
Foundation Profile http://jcp.org/en/jsr/detail?id=46
Personal Profile http://jcp.org/en/jsr/detail?id=62
RMI Profile  http://jcp.org/en/jsr/detail?id=66
Game Profile  http://jcp.org/en/jsr/detail?id=134
Personal Basis Profile http://jcp.org/en/jsr/detail?id=216
WMA API  http://jcp.org/en/jsr/detail?id=120
MMAPI http://jcp.org/en/jsr/detail?id=135
Location API http://jcp.org/en/jsr/detail?id=179
SIP API  http://jcp.org/en/jsr/detail?id=180
SATSA API  http://jcp.org/en/jsr/detail?id=177
Mobile 3D API  http://jcp.org/en/jsr/detail?id=184
WSA API  http://jcp.org/en/jsr/detail?id=172
Bluetooth API  http://jcp.org/en/jsr/detail?id=82









 

 

Abbreviations:

 

JDK Java Development Kit
JRE Java Runtime Environment
JTWI Java Technology for Wireless Information
MVM Multi Tasking Virtual Machine
AWT Abstract Window Toolkit
CDC Connected Device Configuration
CLDC Connection Limited Device Configuration
MIDP Mobile Information Device Profile
JSR Java Specification Request
JVM Java Virtual Machine
API Application Programming Interface
J2SE Java 2 Platform, Standard Edition





 

 

Introduction

Nowadays communication has become indivisible part of our daily life. We are dependent on mobiles, internet and other communication devices. So Java Micro Edition (Java ME) provides superfluity opportunities to new java technologies.
Sun Microsystems created Java ME in 1999. It is mainly used on embedded and handheld devices. Examples of Java ME are Personal Digital Assistants (PDA), Mobiles, TV set top boxes, Smart Cards, Personal Organizers etc.  These devices have changed our way of life.



 

Overview

Java Micro Edition (Java ME) is a subset of Java 2 Platform, Standard Edition (J2SE) that is geared towards embedded and handheld devices.


 

Java ME Technology consists of three elements:


 

- Configuration


 

- Profiles


 

- Optional Packages


 

Figure 1 shows the Java ME Elements:
 


 

Configuration

Configuration is a set of Java Runtime classes, which executes Bytecode, provides Native code to interface to the underlying system.
 

Java ME defines two configurations:
 

- Connected Limited Device Configuration (CLDC)


 

- Connected Device Configuration (CDC)


 

Connected Limited Device Configuration (CLDC)

The CLDC specifies the basic set of core library and virtual machine (KVM). CLDC is developed for resource constrained devices. It includes the basics from the  java.lang, java.io and java.util packages, with a few additional classes from the new javax.microedition.io package.
 

There are currently two versions of CLDC they are CLDC 1.0 and CLDC 1.1.


 

For more information, click on the following links:


 

CLDC 1.0: http://www.jcp.org/en/jsr/detail?id=30


 

CLDC 1.1: http://www.jcp.org/en/jsr/detail?id=139
 

Minimum requirements for CLDC are:
 

- 128 kilobytes (minimum) memory for running Java

- 32 kilobytes (minimum) memory for runtime memory allocation

- Low power, typically battery powered

- Network connectivity, typically wireless, with low bandwidth and intermittent access
 

Connected Device Configuration (CDC)
 

The CDC is used in devices having more memory than CLDC and includes almost full Java VM and much larger set of core classes; CDC is in fact a superset of the CLDC.
 

Minimum requirements for CDC are:
 

- 512 kilobytes (minimum) memory for running Java

- 256 kilobytes (minimum) for runtime memory allocation

- Network connectivity, possibly persistent and high bandwidth



 

Profiles

Profile extends configuration, adding domain specific classes. Profile adds classes that aim towards specific set of devices and add functionality missing from the configuration.


 

For example: Most profiles define user interface classes for building interactive applications.


 

Device should support minimum requirements of the underlying configuration and requirements of the profile specification.

Types of profiles are: 

- Mobile Information Device Profile

- Personal Digital Assistants Profile

- Foundation Profile

- Personal Basis

- Personal Profile

- RMI Profile

- Game Profile


 

MIDP: Mobile Information Device Profile

MIDP is the basis for Wireless Java. So it is well known among Java ME profiles. MIDP helps in storage facilities and limited display of cell phones. MIDP adds user interface components, networking and local storage to CLDC.


 

Currently MIDP 1.0 (JSR 37) and MIDP 2.0 (JSR 118) are the two versions of MIDP. 


 

For more information on MIDP 1.0 and MIDP 2.0, please refer to the following links:


 

MIDP 1.0: http://www.jcp.org/en/jsr/detail?id=37


 

MIDP 2.0: http://www.jcp.org/en/jsr/detail?id=118


 

PDA Profile

PDA means Personal Digital Assistant. This is similar to MIDP.  PDAs have more memory and better screens compared to mobile handsets. PDAs can also be used in classrooms for taking digital notes.
 

Foundation Profile

This profile includes core Java 2 Version 1.3 core libraries. This profile is intended to be used by devices requiring a complete implementation of the Java Virtual Machine up to and including the entire Java Platform, Standard Edition API.
 

Personal Basis

This profile is used in complex-user interface platforms. This profile is used on devices that have limited user interface capability. Personal Basis profile provides basic user interface functionality to Foundation profile
 

Personal Profiles 

Personal profile provides an environment for applications that requires Abstract Window Toolkit (AWT) heavyweight components. It provides AWT support comparable to JDK 1.1 and includes a number of more recent feature improvements introduced by the Java Platform, Standard Edition. This Profile serves as a suitable platform for web applets and as a migration path for Personal Java applications.
 

RMI Profile

This profile provides J2SE Remote Method Invocation libraries to the foundation profile. It provides Java to Java remote method invocation environment for devices.
 

Game Profile

This profile provides a platform for writing games software on CDC devices. It targets high-end consumer game devices and desktops.



 

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.


 

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


 

- Information Module Profile (IMP), JSR 195

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

- Mobile Media API (MMAPI), JSR 135

- Location API for J2ME, JSR 179

- SIP API for J2ME, 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

- RMI, JSR 66



 

Downloads

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

Java ME Basics
 

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