Java Reference
In-Depth Information
The CDC is a more restrictive environment than Java SE. Be aware of the following:
• If the CDC implementation with which you're working supports invoking native
methods, you must use Java Native Interface ( JNI) 1.1 to interface with those native
methods.
• If the CDC implementation with which you're working supports a debugging
interface, you must use the Java Virtual Machine Debug Interface ( JVMDI) for
debugging.
• The CDC doesn't support secure code signing, certificates, the key store, and the
JDK 1.1 java.security.Identity and java.security.IdentityScope interfaces.
Typically, any CDC implementation you encounter is accompanied by one or
more profiles, such as the Foundation Profile, giving you support for GUIs and other
capabilities.
Changing the Java Class Library to Fit the CLDC
Shrinking the Java virtual machine was only part of the trick to making the CLDC fit
on mobile devices. One of Java's key benefits to developers is its robust class library.
However, all of that code is also in Java and consumes precious read-only memory
space on constrained devices, and some classes may not even be appropriate because
of their runtime memory consumption. Of course, without its class hierarchy, Java
wouldn't be nearly as compelling a platform, so the architects of the CLDC struck a
balance, establishing an environment with relatively few Java interfaces that can run
on the widest possible variety of devices while supporting a great number of applica-
tions. (And of course, device manufacturers are free to add—and have added—a great
number of additional interfaces.)
Besides the obvious—as you know, neither the AWT nor Java Swing are part of the
CLDC—many other classes, and some methods of other classes, are omitted from the
CLDC. In the following sections, I show you which parts of the java.lang , java.util , and
java.io hierarchies are different between CLDC 1.0, CLDC 1.1, and Java SE, as well as the
additions made by the CLDC to the Java family of libraries.
Changes to the java.lang Package
Table 2-2 lists the classes inherited from the java.lang package. Many of these classes are
a subset of the implementation found in Java SE.
 
Search WWH ::




Custom Search