站内搜索: 请输入搜索关键词
当前页面: 图书首页 > Wireless Java Developing with J2ME, Second Edition

Chapter 1: Introduction - Wireless Java Developing with J2ME, Second Edition

Previous Section Next Section

Chapter 1: Introduction

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.

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 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.

Click To expand
Figure 1-1: The J2ME universe

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/.

Table 1-1: J2ME Configurations, Profiles, and Optional APIs

CONFIGURATIONS

JSR

NAME

URL

30

Connected, Limited Device Configuration (CLDC) 1.0

http://jcp.org/jsr/detail/30.jsp

139

Connected, Limited Device Configuration (CLDC) 1.1

http://jcp.org/jsr/detail/139.jsp

36

Connected Device Configuration

http://jcp.org/jsr/detail/36.jsp

PROFILES

JSR

NAME

URL

37

Mobile Information Device Profile 1.0

http://jcp.org/jsr/detail/37.jsp

118

Mobile Information Device Profile 2.0

http://jcp.org/jsr/detail/118.jsp

75

PDA Profile 1.0

http://jcp.org/jsr/detail/75.jsp

46

Foundation Profile

http://jcp.org/jsr/detail/46.jsp

129

Personal Basis Profile

http://jcp.org/jsr/detail/129.jsp

62

Personal Profile

http://jcp.org/jsr/detail/62.jsp

OPTIONAL APIS

JSR

NAME

URL

66

RMI Optional Package

http://jcp.org/jsr/detail/66.jsp

82

Java APIs for Bluetooth

http://jcp.org/jsr/detail/82.jsp

120

Wireless Messaging API

http://jcp.org/jsr/detail/120.jsp

135

Mobile Media API

http://jcp.org/jsr/detail/135.jsp

179

Location API for J2ME

http://jcp.org/jsr/detail/179.jsp



Previous Section Next Section