Java™ 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 forced applets out of the mainstream. Java, as a platform, did not really take off until the advent of servlets, Java programs that run on a server (essentially a replacement for 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 platforms, without change. Second, Java has important safety features for downloadable code.
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 some 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.
Profiles are more specific than configurations. A profile is based on a configuration and adds APIs for user interface, persistent storage, and whatever else is necessary to develop running applications.
Optional APIs define specific additional functionality that may be included in a particular configuration. 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 later on platform standardization for information on JSR 185, which will define standard J2ME stacks.
Currently, there are a handful of configurations and profiles, as illustrated in Figure 1-1.
To give you a flavor of what's happening in the J2ME world, Table 1-1 shows some of the configurations, profiles, and optional APIs that are available and under development. This is not a comprehensive list; for more information, check out the JCP web site at http://jcp.org/.
|
CONFIGURATIONS |
||
|---|---|---|
|
JSR |
NAME |
URL |
|
30 |
Connected, Limited Device Configuration (CLDC) 1.0 | |
|
139 |
Connected, Limited Device Configuration (CLDC) 1.1 | |
|
36 |
Connected Device Configuration | |
|
PROFILES |
||
|---|---|---|
|
JSR |
NAME |
URL |
|
37 |
Mobile Information Device Profile 1.0 | |
|
118 |
Mobile Information Device Profile 2.0 | |
|
75 |
PDA Profile 1.0 | |
|
46 |
Foundation Profile | |
|
129 |
Personal Basis Profile | |
|
62 |
Personal Profile | |
|
OPTIONAL APIS |
||
|---|---|---|
|
JSR |
NAME |
URL |
|
66 |
RMI Optional Package | |
|
82 |
Java APIs for Bluetooth | |
|
120 |
Wireless Messaging API | |
|
135 |
Mobile Media API | |
|
179 |
Location API for J2ME | |
|
|
||