• No results found

Java systems are currently divided into three major categories, as depicted in Figure 2.1. The largest of these is the Java Enterprice Edition (J2EE) [104], which is targeted for large systems running server software in Java. The Java runtime system found in normal desktop computers is known as Java Standard Edition (J2SE) [105]. Te Java Micro Edition (J2ME) [106] is designed for embedded devices and other resource constrained environ- ments. One more Java variant is the Java Card technology [107], which enables smart cards and other devices with very limited memory to run small Java applications.

The J2ME is further broken down by two criteria, based on the config- uration and profile used for a given device. The configurations define the minimum subset of Java implemented by a device, while the profiles can add some functionality to a given configuration. A Java ME configuration only defines a minimum complement or the “lowest common denominator” of a given Java technology. All the features included in a configuration must

Packages

Optional

Packages

Optional

Card

Java

J2EE

J2SE

J2ME

CDC

CLDC

Profiles MIDP

Java Programming Language

Java Virtual Machine

Figure 2.1: An overview of the variants for a Java virtual machine.

be generally applicable to a wide variety of devices. This means that the scope of a configuration is limited and often incomplete for any given real target devices. Additional features specific to a certain device, or category of devices, are defined in a profile specification.

2.4.1 Configurations and Profiles in J2ME

Currently there are two commonly used configurations. These are known as the Connected Device Configuration (CDC) and the Connected Limited Device Configuration (CLDC).

Connected Device Configuration is a framework for building a Java vir- tual machine suitable for 32-bit RISC/CISC/DSP microprocessors and a few megabytes of working memory. The applications on embedded devices range from pagers up to set-top boxes and high end PDAs. Three profiles are based on the CDC:

• Foundation Profile

– Java SE-like application programming interface (API) – No graphical user interface (GUI)

• Personal Basis Profile

– Extension to Foundation Profile – Lightweight GUI support • Personal Profile

– Extension to Personal Basis Profile

– Full AWT (Abstract Window Toolkit) and applet support – Easy to port PersonalJava-based applications

This configuration is intended to be used by devices requiring a complete implementation of the Java virtual machine, and an API set that may, via the addition of profiles, include the entire J2SE API. Typical implemen- tations use some subset of that API depending on the profiles supported. Two commonly used versions are 1.0b and 1.1.2. The CDC 1.0b API [67] is based primarily on the J2SE 1.3 API and it includes all of the Java language APIs defined in the Java ME CLDC 1.0 specification. The CDC 1.1.2 API [68] is based primarily on the J2SE 1.4.2 API and it includes all of the Java language APIs defined in the CLDC 1.1 specification.

The Connected Limited Device Configuration [69] defines a Java virtual machine suitable for 16-bit or 32-bit RISC/CISC microprocessors with a few hundred kilobytes of available memory. Typical applications include mobile phones and lower end PDAs. There are currently three versions available, numbered 1.0, 1.1 and 1.1.1. The first one is the most limited and it has no floating point support. The classes float and double are completely removed from the specification. This causes all of the bytecode instructions operating on those data types to be redundant, so they are also removed with support- ing libraries. The CLDC version 1.1 adds the floating point data types and bytecode instructions as well as the supporting library methods in the class- path. The minimum memory budget is grown from 162kb to 190kb. This is mainly due to the added floating point support. Also some classes have been modified to be more compatible with J2SE, including Thread, Calen- dar, Date and TimeZone. The version 1.1.1 is only a maintenance release, and it adds only little to the 1.1 specification. The main difference is the ad- dition of support for certain features of the Java technology security model, to provide a common base of Permission classes. Also some arithmetic func- tions have been added to java.lang.Math2, such as sin, acos, atan and atan2.

2

Only one profile is currently available for the CLDC. It is called “Mo- bile Information Device Profile” (MIDP). Currently, two versions of the MIDP are available, 1.0 and 2.0, with a third version in planning stage. The MIDP profile adds the following characteristics to the CLDC configu- ration: a display with minimum screen-size of 96x54 pixels (which should be approximately square), a keyboard or a touch screen, at least 256 kb of non-volatile memory for the MIDP implementation, 8 kb of non-volatile memory for application-created persistent data and 128 kilobytes of volatile memory for the Java runtime (e.g., the Java heap), networking with limited bandwidth and sound capabilities. This is the minimum set of requirements. Typically mobile phones with a Java virtual machine support this set and often even surpass the requirements.

2.4.2 History

The Java programming language was originally a part of a research project to develop software for network devices and embedded systems. In the be- ginning of the ’90s, Javas predecessor, known as Oak, was created for a device called *7. The *7 was a small SPARC based device with a tiny operating system, much like an early version of a modern PDA. The *7 never made its way to a consumer device, but Oak, renamed to Java, was released in 1995. Java was then intended to be a new language for the Inter- net, and to be integrated into Netscape’s browser. In 1997 Sun announced the PicoJava processor architecture. The PicoJava was supposed to be a standalone Java engine using dedicated hardware, but Sun never actually manufactured these processors. Since then Java has been expanding the application domain steadily, including areas like desktop applications, web servers and server applications. The diverse requirements and capabilities of these application domains caused the separation of the Java standard edi- tion (J2SE) and the enterprise edition (J2EE) in 1999. Every new release brought new features to the standard library, thus increasing the size of the runtime system. The growth in the portable device market, ushered by the mobile phone industry, revived Sun’s interest in the embedded systems. Sun defined different subsets of Java for embedded systems and collected them into Java micro edition (J2ME) in 2000. In order to broaden the application domain even further, the Real-Time Specification for Java (RTSJ) [6] was approved in 2002. Since the origins of Java lie in embedded systems and current trends have moved Java to that specific field, one might say that Java is coming home.