Java CDC
Java2 Standard Edition
-
Java has been through versions 1.0-1.4
-
From Java 1.2 onwards, it is also called Java 2
-
It was originally designed for set-top boxes, but changed to
a general-purpose language due to a project deadline nearly
closing the Java project
-
There is "cruft" in Java - many obsolete classes
-
Java Standard Edition is large
-
The libraries occupy about 5M of disk
-
A typical Java application uses 50M+ of RAM,
although much of this is caused by e.g.
default stack size settings
-
So Java 2 is big and "old" (9 years since public release)
Limiting Java size
-
Java is a general purpose language, just like Windows and
Linux are general purpose Operating Systems
-
Just like Windows and Linux, Java can be reduced in size
-
This can be done by
-
Reducing virtual machine size and requirements -
the configuration
-
Choosing appropriate application requirements -
the profile
Profiles and Configurations
Configurations
-
This sets out the different types of virtual machines and
their requirments
-
The Connected Device Configuration (CDC)
is for systems with a reasonable amount of memory: 2M+
-
The Connected, Limited Device Configuration (LCDC)
is for small devices from 160Kb upwards
-
The standard J2SE (Standard Edition) and J2EE (Enterprise
Edition) versions remain for large systems such as desktop
PCs
-
The configurations basically set out the memory constraints
of the system
-
CLDC for cellphones, two-way pagers, personal organisers,
home appliances, etc
-
CDC for emerging cellphones, point-of-sale terminals,
more expensive home appliances, automobile navigation
systems, etc
VM classes
Profiles
-
The configuration says what the virtual machine can do and needs
-
An application needs to do more e.g. use I/O to communicate
with the user
-
A profile is added on top, to support a class of
applications e.g. small screen devices such as phones;
wireless connectivity for portable devices;
internet connectivity for fixed devices
CDC
The CDC Configuration
This defines what is needed to run a virtual machine in 2M+,
supporting all Java 2 language features
-
All basic data types: int, float, boolean, etc
-
Objects and classes
-
Garbage collection
-
Threads
-
Java 2 security
-
Some I/O
-
Some networking
-
Some internationalisation
-
RMI, JNI,
reflection, serialisation, JVM debugger interface, weak references
CDC classes
-
java.lang
- virtual machine classes
-
java.util
- some
-
java.net
- UDP, not TCP
-
java.io
- file I/O
-
java.text
- minimal I18n, for error messages
-
java.security
- minimal
CVM
-
The CVM is the virtual machine for the CDC configuration
-
It is written in C and uses all the techniques learnt in the
last 9 years of JVM technology
-
It requires about 1/2 the space of a traditional JVM, about
0.5M+
-
There is no GUI stuff - the AWT is gone, Swing is not included -
why should a JVM need a GUI?
Foundation profile
-
The CDC requires a set of classes to run the VM, but not all of of the
standard Java classes
-
The Foundation profile adds in most of the rest of the contents
of the packages for non-gui applications
-
java.lang
-
java.util
-
java.net
- adds sockets and HTTP
-
java.io
- readers and writers
-
java.text
-
java.security
- code signing, certificates
-
All of the deprecated classes and methods are gone
-
e.g. the class
java.io.LineNumberInputStream
is gone
-
e.g. the method
java.io.DataInputStream.readLine()
is gone
-
Note that the AWT is not included, and neither are any of the
javax
packages
Relation of CDC to J2SE
-
There is just a general cleanup of J2SE classes
-
All Java 2 language features are present
-
A CDC/Foundation application will run under J2SE and J2EE,
but maybe not the other way
-
GUI classes are missing
-
Extension classes are missing (no Swing, either)
-
Future application-level profiles may add to these classes
-
Currently, there are lots of proposed
GUI classes for embedded applications, so standardisation may
take a long time
CDC Profiles
There are currently two profiles defined above the Foundation profile
-
Personal Basis Profile
The Personal Basis Profile is for network-connected devices supporting a
basic level of graphic presentation. It is suitable for the interactive
television market and contains many of the necessary APIs for support
of the Multimedia Home Platform (MHP)
-
Personal Profile
The Personal Profile, JSR-62, provides Java APIs for devices requiring
a high degree of network connectivity such as applications for the home
and office.
Personal Basis profile
-
The AWT has
-
general drawing classes and methods e.g.
Graphics.drawLine()
-
general event generation and handling
e.g.
MouseEvent
and MouseListener
-
specific widgets such as
Button
,
List
-
The Personal Basis Profile has the general classes, but not the specific
widgets
-
This allows any desired GUI to be built e.g. HAVi GUI objects,
Java TV GUI objects, etc
Personal Basis Profile classes
Personal profile
-
The Personal Profile replaces the Personal Java specification
-
The Personal profile basically adds in the rest of the AWT
-
It still leaves out deprecated classes and methods from the J2SE
-
It does not include the
javax
packages
Jan Newmarch <jan@newmarch.name>
Last modified: Fri Dec 3 19:59:17 EST 2004
Copyright © Jan Newmarch, Monash University, 2007
This work is licensed under a
Creative Commons License
The moral right of Jan Newmarch to be identified as the author of this page has been asserted.