Java Reference
In-Depth Information
CHAPTER 1
■ ■ ■
Introduction
J ava 2 Platform, Micro Edition (J2ME) is the second revolution in Java's short history. When
Java was introduced in 1995, it looked like the future of computing was in applets , small programs
that could be downloaded and run on demand. A slow Internet and a restrictive all-or-nothing
sandbox security model accounted for the initially slow adoption of applets. Java, as a platform,
really took off with the advent of servlets , Java programs that run on a server (offering a modular
and efficient replacement for the vulnerable CGI). Java further expanded into the server side of
things, eventually picking up the moniker of Java 2 Platform, Enterprise Edition (J2EE). This
was the first revolution, the blitz of server-side Java.
The second revolution is the explosion of small-device Java, and it's happening now. The
market for small devices is expanding rapidly, and Java is important for two reasons. First,
developers can write code and have it run on dozens of small devices, without change. Second,
Java has important safety features for downloadable code.
Understanding J2ME
J2ME isn't a specific piece of software or specification. All it means is Java for small devices.
Small devices range in size from pagers, mobile phones, and personal digital assistants (PDAs)
all the way up to things like set-top boxes that are just shy of being desktop PCs.
J2ME is divided into configurations , profiles , and optional APIs , which provide specific
information about APIs and different families of devices. A configuration is designed for a
specific kind of device based on memory constraints and processor power. It specifies a Java
Virtual Machine (JVM) that can be easily ported to devices supporting the configuration. It also
specifies a strict subset of the Java 2 Platform, Standard Edition (J2SE) APIs that will be used
on the platform, as well as additional APIs that may be necessary. Device manufacturers are
responsible for porting a specific configuration to their devices.
Profiles are more specific than configurations. A profile is based on a configuration and
provides additional APIs, such as user interface, persistent storage, and whatever else is necessary
to develop running applications for the device.
Optional APIs define specific additional functionality that may be included in a particular
configuration (or profile). The whole caboodle—configuration, profile, and optional APIs—
that is implemented on a device is called a stack . For example, a possible future device stack
might be CLDC/MIDP + Mobile Media API. See the section “Platform Standardization” later in
this chapter for information on JSR 185, which defines a standard J2ME stack.
Currently, there are a handful of configurations and profiles; the most relevant ones for
J2ME developers are illustrated in Figure 1-1.
1
Search WWH ::




Custom Search