|Oracle® Java Micro Edition Embedded Client Architecture Guide
This chapter describes the fundamental components of the Oracle Java Micro Edition Embedded Client, the virtual machine that executes Java applications, two sets of the libraries that applications can use. Together, the virtual machine and core libraries described in this chapter are called the Connected Device Configuration (CDC). Supplementing CDC is the set of libraries called the Foundation Profile.
This chapter includes these topics:
Java programs are compiled on a host computer into a portable intermediate form called Java bytecodes. In Oracle Java Micro Edition Embedded Client, files containing bytecodes are loaded to the target device where the resident CDC virtual machine (CVM) inspects, decodes, and executes them.
Ahead-of-time (AOT) Compiler describes an alternative ahead-of-time compiler.
Java compilers generate machine-independent bytecodes instead of machine instructions. The interpreter is like a CPU implemented in software. It decodes and executes bytecodes, independent of what computer they were compiled on.
As the interpreter executes blocks of bytecodes, it tracks the number of times a block is executed. Frequently executed blocks are called hot spots. Periodically during execution, the dynamic compiler creates machine-language versions of hot spots, which are thereafter invoked instead of the interpreter. Compiled code runs about 10 times as fast as interpretation, so the investment in compilation pays off quickly.
For details on how the dynamic compiler works and how you can adjust its operation, see the Customization Guide's Tuning chapter.
Automatic reclamation of unusable heap objects (garbage collection) is central to the Java virtual machine. By automating memory reclamation, the garbage collector prevents common and difficult-to-diagnose programmer errors. Failing to release unneeded memory, and prematurely releasing needed memory can stop a system, which is especially serious for an embedded device. The CDC garbage collector is efficient and can be adjusted to minimize interference with user-visible activities.
For details on how the heap works and how you can adjust its configuration, see the Customization Guide's Tuning chapter.
The CDC class libraries implement a minimal Java API, including subsets of these Java SE packages:
java.lang: virtual machine system classes, including thread
java.util: Java utilities
java.net: UDP, InetAddress, and URL I/O
java.io: Java file input/output
java.text: minimal support for internationalization
java.security: minimal security and encryption
For CDC class library details, see
The Foundation Profile (FP) supplements the CDC class libraries described in CDC Class Libraries. FP gives Oracle Java Micro Edition Embedded Client application developers approximately the same APIs available in Java SE 1.4.2, minus graphical user interface features.
FP adds classes to CDC's
java.util. It also adds HTTP networking to
javax.microedition.io. For FB class library details, see