Understanding The Connected Device Configuration (CDC) :
The CDC specification defines four things in particular :
The capabilities of the Java virtual machine (VM). Unlike the CLDC, the CDC VM is a full-featured VM.
A subset, much larger than the CLDC's, of the J2SE 1.3 classes.
The same APIs (application programming interfaces) that are new to the CLDC -- in other words, the Generic Connection Framework (GCF).
Support for file- and datagram-based input/output using both the GCF and the familiar java.io and java.net classes.
Note that, just like the CLDC, the CDC does not define any user interface classes or how applications are loaded and activated: these are left for the profiles to define.
The Virtual Machine :
The CDC supports a complete, full-featured Java 2 virtual machine (VM) as defined in The Java Virtual Machine Specification. The low-level interfaces for calling native code, connecting to debuggers, and profiling code are optional, but if supported they must be the standard interfaces -- Java Native Interface (JNI), Java Virtual Machine Debugging Interface (JVMDI), and Java Virtual Machine Profiling Interface (JMVPI) -- used in Java 1.3.
Note that the CDC does not require preverification of classes, as full class verification is done on the device by the VM. Classes that have been preverified can also be used, of course, since the additional information added to the class files by the preverifier is ignored.
The J2SE Subset :
The subset of J2SE 1.3 included in the CDC consists of classes from these packages:
java.io
java.lang
java.lang.ref
java.lang.math
java.net
java.security
java.security.cert
java.text
java.util
java.util.jar
java.util.zip
As you can see, the CDC includes many more packages than the CLDC, and many more classes even in the shared packages. For example, the CDC includes the collections classes from the java.util package, while the CLDC does not.
This makes the CDC a much more J2SE-like environment than the CLDC. There are still classes missing, of course. For example, the java.net package as defined by the CDC only includes the classes related to datagram sockets, not stream sockets.
No comments:
Post a Comment