J2ME: Introduction, Configurations and Profiles: Keywords: Java 2 Micro Edition (J2ME), PDA, Configuration, CDC, CLDC
J2ME: Introduction, Configurations and Profiles: Keywords: Java 2 Micro Edition (J2ME), PDA, Configuration, CDC, CLDC
J2ME: Introduction, Configurations and Profiles: Keywords: Java 2 Micro Edition (J2ME), PDA, Configuration, CDC, CLDC
Profiles
Urs Steiner
University of Zürich
urs@darkstone.ch
Abstract
A small presentation of the topics of Java 2 Micro Edition (J2ME) by Sun
Microsystems, configurations and profiles. For customer and embedded
systems, including mobile devices, J2ME provides a portable application
environment. A user having a J2ME enabled mobile device will be able to
download applications from a network and run them on his/her mobile device.
Keywords: Java 2 Micro Edition (J2ME), PDA, Configuration, CDC, CLDC,
Profile, MIDP, JVM, KVM, JBED.
1
Table of Contents:
Table of Contents:............................................................................................2
Table of Figures: ..............................................................................................2
Introduction ......................................................................................................2
Configurations..................................................................................................4
CLDC: Connected Limited Device Configuration..........................................5
CDC: Connected Device Configuration ........................................................6
Profiles .............................................................................................................6
MIDP: Mobile information device profile (on top of CLDC) ...........................6
Foundation Profile (on top of CDC) ..............................................................7
Personal Profile (CDC, successor to PersonalJava) ....................................7
Other profiles................................................................................................7
Virtual Machines ..............................................................................................7
The K Virtual Machine (for the CLDC) ..........................................................7
JBED Micro Edition CLDC™ ........................................................................7
Other Virtual Machines .................................................................................8
Conclusions: ....................................................................................................8
Thanks: ............................................................................................................8
Abbreviations: ..................................................................................................8
References:......................................................................................................9
Listings.............................................................................................................9
Listing 1 ........................................................................................................9
Copyrights, trademarks, etc ...........................................................................11
Table of Figures:
Figure 1: Fragmentation of Java 2 ...................................................................3
Figure 2............................................................................................................5
Introduction
During the development of their new Java 2 platform Sun recognised in 1999
that they had to cut back from their motto “compile once, run everywhere”
(even though this wasn’t true beforehand and afterwards surely also not) and
decided to split up this new version of Java in three distinct parts:
• Java 2 Enterprise Edition (J2EE). For enterprises with a need to serve
their suppliers, customers and employees with Internet business server
solutions.
• Java 2 Standard Edition (J2SE). For the well-established desktop
market and Internet applications.
2
• Java 2 Micro Edition (J2ME). For consumer and embedded device
manufacturers who build many really divers kinds of information
devices, service providers who wish to deliver content to their
customers over those devices, and content creators for small,
resource-constrained devices.
Even so, the problem Sun had to face with the Micro Edition was that there
were entirely different run time environments among the target platforms.
Devices for J2ME could be:
• With / without keyboard.
• With / without display (grayscale / color).
• With / without network interface (LAN, WAN, Internet).
• Memory from some few 10kByte up to 16Mbyte.
3
• Upward scalability with J2SE and J2EE.
At the higher level, J2ME is targeted at two distinct groups of products (see
FIGURE 1):
• Personal, mobile, connected information devices. E.g. Personal
organizers, Cell phones or pagers.
• Shared, fixed, connected information devices. E.g. Internet TVs, screen
phones, high-end communicators or car entertainment/navigation
systems.
As always is the case when distinguishing, the border between these two
product groups is fluid. To address the inherent diversity of the Java 2 Micro
Edition market, an essential requirement is not only small size but also
modularity and customizability. Because of this, the Java 2 Micro Edition
architecture was made modular and scalable to support this kind of flexible
deployment demanded by the target markets, which in this case are the
rapidly growing consumer and embedded markets.
For lower-end, resource-limited products (compared to normal personal
computers), Java 2 Micro Edition supports minimal configurations of the Java
virtual machine and Java APIs that provide and capture just the essential
capabilities of each kind of device. As device manufacturers add new features
to their devices, or service providers develop new and exciting applications,
these configurations will be expanded with additional APIs or with a richer
complement of Java virtual machine features. To support this kind of
customizability and extensibility, the two essential concepts of configurations
and profiles were defined.
New Configurations and profiles are created by an open process for defining
new additions to Java called “Java Community Process” (JCP).
Configurations
The J2ME platform covers a large range of different devices types. Devices
like TV set-top boxes, Internet TVs and high-end communicators have a large
range of user interface capabilities and memory budgets in range of 2 to 16
megabytes as well. On the other hand devices like simple mobile phones,
pagers and personal organizers have a very simple user interface and low-
level memory budget. Due to the large range of different type devices in the
J2ME market place, Sun has split the Java 2 Micro Edition in configurations.
Configurations define virtual machines features, Java language features and
Java API classes for each configuration environment. A J2ME configuration
defines a minimum platform for a “horizontal” class or family of devices, each
with similar requirements on total memory budget and processing power. A
configuration defines the Java language and virtual machine features and
minimum libraries that a J2ME supported device manufacturer or a content
provider can expect to be available on all devices of the same class.
To avoid fragmentation that could lead to confusion, Sun has introduced until
now only two configurations, which are:
4
CLDC: Connected Limited Device Configuration
• Very simple user interface (including no UI at all)
• Low level memory budgets (160 kB to 512 kB)
• 16 or 32 bit processors
• Wireless communication, possibly low bandwidth
• Limited power, often battery operation.
• Examples: Mobile phones, pagers and personal organizers.
Figure 2
5
user, e.g. mobile phones or PDAs. So the market consisting of personal,
mobile, connected information devices is served by the CLDC. This
configuration includes some new classes, not drawn from the J2SE APIs,
designed specifically to fit the needs of small-footprint devices.
See also presentation 2 by Christoph Bürki & Tobor Dekany
Profiles
The configurations help already a lot to distinguish different types of devices.
But as there so many types around they still have to be refined further
because a configuration might cover devices intended for totally different
usage, like mobile phones and refrigerators, or washing machines and set-top
boxes. The mobile phone and e.g. a washing machine could belong to the
same configuration but it is obvious that a mobile phone application is not
expected to run on the washing machine or vice versa. Thus, the J2ME
framework provides the concept of a profile to achieve application
environment portability.
A J2ME profile addresses the specific demands of a certain “vertical” market
segment (e.g. banking or payment applications) or device category. Because
of this, profiles may include libraries that are far more device category specific
than the libraries provided in a configuration.
Profiles are implemented on top of a configuration. Applications then are
written for a specific profile, as profiles are assembled for a specific
configuration. Both profiles and configurations define a set of Java API
classes which can be used by the applications. A device that is designed to
support a profile or several profiles, agrees to implement all features and Java
API classes which are specified by the profile(s) and corresponding
configuration.
From an implementation viewpoint, a profile is just a collection of Java APIs
and class libraries residing on top of a configuration and providing domain-
specific capabilities for devices in a specific market segment.
6
battery life, and CPU power. Two types of devices will be accommodated:
mobile information appliances and voice communication devices.
See also presentation 6 by Marco Dubacher & Markus Blatter.
Other profiles
RMI profile (on top of Foundation Profile and CDC):
Provides interoperability with J2SE RMI.
PDA Profile (on top of CLDC)
See also presentation 6 by Marco Dubacher & Markus Blatter.
Virtual Machines
7
small. As the name implies JBED also implements the Connected Limited
Device Configuration
Conclusions:
Sun provides a powerful yet easy to use (that is, if you know Java) toolkit /
framework with J2ME that could evolve to be the standard for the future for
embedded devices of all kinds. With the addition of more profiles in the future
this will be (or could be if they don’t overdo or underdo it) a well rounded
package which could easily be the standard for such things if everything goes
alright .
In my opinion, the success of J2ME will ultimately depend on its acceptance
and support by the device manufacturers (logical), the finding of a “killer
application” for devices not normally used as computers (e.g. washing
machines) and the quality of the different VMs for the different devices
(especially the code / bytecode reusability between different devices which is
nowadays not always given with J2SE). Another critical factor is the success
of the next generations of mobile phones, apart from Personal Digital
Assistants the biggest target platform existing at the moment. At the moment
this looks good, but with the dark cloud called UMTS (and spending too much
on licenses and stations for it) hanging in the sky over the telecommunications
industry this can change very fast (an added malus point is that there still
doesn’t seem to be a killer application for UMTS).
Thanks:
Krummi (he knows why)
Netcetera AG where I work (and did some of the research for this paper),
especially Joachim Hagger, Marco Torpo and Peter Brantschen (for his small
example)
Dr. R. Riedl
Abbreviations:
CDC Connected Device Configuration
8
CLDC Connected Limited Device Configuration
IBM International Business Machines, Inc.
J2EE Java 2 Enterprise Edition
J2ME Java 2 Micro Edition
J2SE Java 2 Standard Edition
JCP Java Community Process
JVM Java Virtual Machine
KVM K Virtual Machine
LAN Local Area Network
LAPD Los Angeles Police Department
MIDP Mobile Information Device Profile
PDA Personal Digital Assistant
UMTS Universal Mobile Telecommunication System
VM Virtual Machine
WAN Wide Area Network
References:
http://java.sun.com/
http://discolab.rutgers.edu/classes/cs672/j2me/Appendix1/CLDCappendix-
intro.pdf
http://www.hut.fi/~opaal/netsec/j2me.pdf
http://www.esmertec.com/
http://www.esmertec.com/p_jbed_cldc_long.html
http://www.cuj.com/java/articles/a9_fig.htm
Listings
Listing 1
/* @author Peter Meehan Copyright (c) 2000 */
import com.sun.kjava.*;
9
Graphics g = Graphics.getGraphics();
10
Copyrights, trademarks, etc
Jbed and Jbed Micro Edition CLDC are registered trademarks of esmertec,
Inc.
Sun, Sun Microsystems, the Sun logo, Java, Java 2 Platform Micro Edition,
J2ME, K Virtual Machine, KVM, Connected (Limited) Device Configuration,
Personal Java, JDK and some other terms are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and other
countries.
Palm OS is a registered trademark of Palm, Inc. or its subsidiaries.
Some of the other product names used herein have been included for
identification purposes only and may be trademarks of their respective
companies.
The copyright for this document is by the University of Zürich and Urs Steiner.
11