|Oracle® Java Micro Edition Connected Device Configuration Runtime Guide
Release 1.1.2 for Oracle Java Micro Edition Embedded Client
A Java runtime environment is an implementation of Java technology for a specific target platform. It performs a middleware function with features common to a native application: it is installed, launched and run like a native application. But its real purpose is to launch, run and manage Java application software on the target platform.
The CDC Java runtime environment is an implementation of Java technology for connected devices. These include mobile devices like PDAs and smart phones in addition to attached devices like set-top boxes, printers and kiosks.
CDC target devices can vary widely based on their features and purpose. Figure 1-1 describes some CDC target device categories and organizes them by their two most important characteristics: purpose (fixed or general) and mobility (mobile or attached).
Figure 1-1 CDC Target Device Categories
This runtime guide describes how to use the CDC Java runtime environment for different purposes including application development, runtime development and solution deployment.
This chapter briefly introduces the CDC Java runtime environment through the following:
It is difficult to describe CDC technology without reference to the Java Standard Edition (Java SE) platform because Java SE represents the core of Java technology. In fact, the principal goal of CDC is to adapt Java SE technology from desktop systems to connected devices. Most of CDC's modifications to Java SE APIs are based on identifying features that are either too large or inappropriate for CDC target devices and then either removing or making them optional.
Other related goals of CDC include the following:
Broaden the number of target devices for Java application software.
Take advantage of target device features while fitting within their resource limitations.
Provide a runtime implementation optimized for connected devices.
Leverage Java SE developer tools, skills and technology.
The CDC Java runtime environment described in this runtime guide can operate in several different usage contexts:
During product development, the CDC Java runtime environment has testing features that can help isolate problems while porting CDC technology to a new target platform. For example, the trace features provide details about opcode and method execution in addition to garbage collection (GC) state.
One of the final stages of product development is TCK verification. A TCK is a test suite that verifies the behavior of an implementation of Java technology. The TCK includes a test harness that runs a candidate Java runtime environment and launches a series of test Java applications. TCK verification is described in the TCK user guides listed in the CDC Technology Compatibility Kit User's Guide.
Application development for the CDC platform requires a target Java class library for compiling Java source code and a CDC Java runtime environment for testing and debugging. Chapter 6, "Developer Tools" provides more information about application development with the CDC Java runtime environment.
When an application is complete and tested, it's ready for deployment. CDC provides a number of deployment mechanisms including preloading with
JavaCodeCompact, managed application models like xlets and network-based provisioning systems.
CDC technology is delivered by Oracle through different kinds of software releases:
A Reference Implementation (RI) demonstrates Java technology that is described in a Java Specification Request (JSR) and verified by a corresponding Technology Compatibility Kit (TCK). Because it serves a demonstration purpose, an RI does not provide the best available performance features.
The sample RI described by this guide is based on the Linux/x86/Qt platform.
An Optimized Implementation (OI) is also a TCK-compliant implementation of Java technology. An OI provides the following benefits:
Undergoes more quality assurance (QA) testing
Provides superior performance
Supports a strategic platform or can be used as a starting point for porting Java technology to a different target platform
CDC is an adaptable technology that can support a range of connected target devices that exist today and in the future. The following are the baseline system requirements of these connected devices:
32-bit RISC-based or x86 microprocessor
The memory requirements for a CDC Java runtime environment vary based on the native platform, the profile and optional packages and the application. See Section 3.4, "Memory Management" for memory usage guidelines.
Other features of the CDC target device can include:
A display for a graphical user interface (GUI)
Unicode font support
An open or proprietary native platform that provides operating system services
CDC is part of the family of Java Micro Edition (Java ME) technology standards that support application software for connected devices. From an application developer's perspective, CDC is a standards-based framework for creating and deploying application software on a broad range of consumer and embedded devices. The CDC APIs are largely based on well-known Java SE APIs, which makes the job of migrating skills, tools and source code easier. From a product designer's perspective, CDC provides a standards-based Java runtime environment that supports a variety of target devices. This allows product designers to provide an application platform that fits within their device's resource limitations while supporting a large number of applications and developers.
Java ME standards are developed in collaboration with industry leaders through the Java Community Process (
http://jcp.org). JCP standards allow Java technology to adapt to the needs of evolving products in an open way by defining APIs that address common needs in application development. Furthermore, these standards allow product designers to choose which API features fit their product needs.
Java ME technology uses three kinds of API standards described in Table 1-1 as building blocks that can be combined in a specific product solution.
Table 1-1 Java ME API Standards
Defines the most basic Java class library and Java virtual machine capabilities for a broad range of devices.
Connected Device Configuration (CDC, JSR-218) supports connected devices like smart phones, set-top boxes and office equipment.
Defines additional APIs that support a narrower range of devices. A profile is built on a specific configuration.
Personal Basis Profile (JSR-217) provides a standards-based GUI framework for supporting lightweight components. Personal Basis Profile adds support for the xlet application model.
Defines a set of technology-specific APIs.
Each Java ME licensee can create a Java runtime environment by choosing from a menu of standard APIs. The designer's choice must contain a configuration, and optionally, a profile and any number of optional packages. These choices can vary from product to product. The critical point to understand is that the application developer must separately learn about which API combinations are available for a specific CDC product implementation.
For example, Figure 1-2 describes a Java runtime environment where a product designer selects CDC, RMI Optional Package, and JDBC Optional Package to represent a conforming CDC Java runtime environment.
Figure 1-2 An Example CDC Java Runtime Environment
Note:See the companion document CDC Build System Guide for information on how to build a target development version of the CDC Java class library for application development that reflects the APIs chosen for a specific target product. Chapter 6, "Developer Tools" describes how to compile Java application software with such a library.
The applications targeted by CDC technology have certain characteristics that distinguish them from the productivity tools and utilities common to desktop platforms.
Network connectivity. The dominant trends in application development, like web browsers, XML-based web services and RSS, are based on network connectivity. Examples include the evolution of PDAs and cell phones into connected devices and the evolution of office printers into multi-function peripherals that can generate campus-specific reports.
Security. Application developers and users are becoming increasingly aware of the need for security for their mobile and distributed applications. The Java SE security framework in CDC allows applications to use fine-grained security policies for application and enterprise security needs.
Application deployment. Java technology has traditionally provided flexible application models. CDC profiles support managed application models like xlets that allow developers to easily deploy applications over the network, either directly or through a provisioning server.
Standard data access. Mobile clients need access to central databases to view and modify information. The JDBC and web Services optional packages provide standard data access for client-side applications.
Portable GUIs. With the broad range of CDC target devices, applications need a GUI system that is flexible enough different user experiences and workflows while being portable enough to support different target devices. Personal Basis Profile supports conventional AWT-based GUIs in addition to providing a hosting layer for building and supporting GUIs based on industry-standards and vendor-specific interfaces.
Because CDC APIs are derived from Java SE APIs, application developers can migrate both their software and their skills to the CDC platform with little effort. Java SE developers can easily learn CDC APIs by focusing on their small differences with Java SE APIs. It is therefore easy to modify Java SE software for CDC devices. The ability to use Java SE developer tools like compilers, debuggers and profilers makes this transition easier.
The CDC Java runtime environment uses several developer tool-oriented specifications, including the following:
Because CDC is based on the Java Virtual Machine Specification (see
http://java.sun.com/docs/books/vmspec), application developers can use conventional Java SE compilers like
The Java Virtual Machine Tools Interface (JVMTI, see
http://download.oracle.com/javase/1.5.0/docs/guide/jvmti) defines an interface that allows developer tools like debuggers and profilers to control and measure runtime data for a specific application or benchmark.
The Java ME Unified Emulator Interface Specification (UEI, see
http://java.sun.com/j2me/docs/uei_specs.pdf) defines an interface that allows an external developer tool to control a Java ME emulator.
cvm, the CDC application launcher, uses many command-line options that are available with
java, the Java SE application launcher. Many of these options can be used for application testing and development.
Java SE tools like
keytool can also be used in CDC application development and deployment.