 |
Jeff on Java
What do we mean when we say Java?
Often people will show up at JGO/games.dev.java.net and start making statements that begin "Java Is...", but what does Java really mean?
The first thing to undestand is that Java formally is not a noun, it is an adjective. What people are generally referring to when they say "Java" is properly The Java(tm) Platform.
So that begs the question, what is the Java(tm) Platform? A Java Platform is defined by the combination of three things, A Java(tm) Virtual Machine(VM), a Java(tm) Language Specification, and a set of APIs that defines a particular coding environment.
What are the different Java Platforms?
A Java platform is defined by the combination of three things, A Java(tm) Virtual Machine(VM), A Java(tm) Language Specification, and a set of APIs that defines a particular coding environment. There are actually a great many different Java(tm) Platforms, but they can be divided up today into three main groups or Configurations: Java(tm) Standard Edition (JSE, sometimes called J2SE?), Java(tm) Micro Edition/Connected Device Configuration(J2ME/CDC) and Java(tm) Micro Edition/Connected Limited Device Configuration(J2ME/CLDC).
The J2SE? specification is the most complex, complete, and fully functional of the three families of Java Platforms. It is intended for full featured computers and mostly runs on desktop computers and servers, although some bleeding edge companies have made it run on smaller devices. J2ME/CDC is a smaller configuration intended for use on mid-range embedded devices such as set-top boxes. J2ME/CLDC is the tiniest and least capable of the Java(tm) configurations and is what is used on low-power and low-RAM devices such as most of today's cell-phones.
Another Java "edition" you will see commonly mentioned is Jave Enterprise Edition (JEE). JEE however is really a layer ontop of J2SE? and so can be considered part of it's family, much the way various J2ME Profiles are part of the J2ME/CDC and J2ME/CLDC families. (See "What is a profile?" below for more information.)
What is a Configuration?
A configuration literally is a minimum set of APIs a Java(tm) Platform must support to be considered a stadnards compliant version of Java. (The official Sun definitions are here.
Those APIs however imply certain VM and language features (particuarly the APIs in the java.lang.* space and javax.* space). Thus in practice a Configuration is defined by a Java(tm) Virtual Machine Specification, a Java(tm) Language Specification, and a base API specification.
What is J2SE??
Java(tm) Standard Edition (JSE) is the kind of Java(tm) platform you see on desktop computers. Its is what you get from Sun if you go to GetJava.com. It is also availble from Apple for OSX and from IBM. The Apple version is closely based on the Sun JSE Software Development Kit (SDK). IBM's was also originally based on the Sun code but has been majorly re-written by them to make it easier for them to port to their legacy main-frames. All three provide the exact same Java(tm) Platform.
Java 2 Standard Edition is actually more then a Configuration in that the other Configurations do not define complete useful Platforms but the J2SE? specification does. J2SE? is defined by the J2SE? standard set by the Java Community Process (JCP).
J2SE? is the fastest form of Java avilable today. In general J2SE? Virtual Machines (VMs) are capable of speeds equivalent to C and C+++ when exectuing programs. (For more information on that, See my "JeffOnPerformance" page.) It is also the most capable, making all of the features of the Java(tm) Platform available to programmers and having tools already present in its coding environemnt to do everything from parsing XML files to talking to databases.
The J2SE? specification includes a VM specification. In practice, that VM can also be seen as being currently defined by the features and behaviors of Sun's Hotspot VM.
What is J2ME?
J2ME stands for (Java 2 Micro Edition) and is really a "super-group" or catch-all for all the Java(tm) platforms that are not based on JSE.
J2ME currently has two Configurations under it's umbrella: J2ME/Connected Device Configuration (J2ME/CDC) and J2ME/Connected Limited Device Configueration (J2ME/CLDC.) Each family name (CDC and CLDC) defines a Java(tm) Virtual Machine and a Java(tm) Language Specification as well as very rudimentary set of APIs. It does not however define a complete useful coding environment. Thus, unlike J2SE?, a J2ME Configuration name such as CDC or CLDC, does not define an entire Java(tm) Platform by itself. Rather it is a base from which sucha a platform can be built.
What is a J2ME Profile?
A Profile is the rest of the software API definition part of the definition of a J2ME Java(tm) Platform. A Profile plus a Configuration (CDC/CLDC) together define a full Java(tm) Platform. Profiles are defined through the Java(tm) Community Process (JCP). There are many Profiles already defined today. Some exampels are the Mobile Information Device Profile (MIDP and now MIDP2), the Personal Basis Profile (PBP) and the Personal Profile (PP). Each profile is intended to address the programming needs of a different kind of device.
Today, CLDC and CDC each have their own non-overlapping set of standard Profiles. Because of this, stating a profile name implies a family and programmers will often refer to the entire platform with the Proile name. For example, MIDP on cell phones. Technically however this is not a complete defition of a Java(tm) platform. The complete definition is J2ME CLDC/MIDP.
What is J2ME/CDC?
J2ME/Connected Device Configuration (J2ME/CDC) is a J2ME Configuration designed for mid to high end embedded devices such as today's set-top boxes and game consoles. J2ME/CDC defines it's virtual machine as having to meet a different specification then the J2SE? VM. This specification is very very close to the J2SE? VM definition, having virtually all of the same abilities, but in a few places, minor concessions or changes have been made in order to better fit the classes of devices CDC is intended for. Sun (and others) builds custom VMs to meet the CVM specification on a client's device. The current line of Sun VMs are based on a technology called "CVM" or "Classic VM".
One of the places where CDC VM implementations typically make compromise to bring the total RAM footprint down to what these kinds of devices can handle is in performance. Sun's CVM implementation today gets between 85% and 90% of the speed of the J2SE? Hotspot Client VM 1.4.
What is J2ME/CLDC?
J2ME/Connected Limited Device Configuration (J2ME/CDC) is a J2ME Configuration designed for very limited computer devices such as most of today's cell phones. The devices are characterized by low processor power and very small system RAM sizes. J2ME/CLDC defines it's virtual machine as having to meet a much more limtied specification even then CDC. Sun's first VM to meet this specification was called KVM and that is what most people experience when they run their cell phones.
The K in KVM is short for Kilobytes. The KVM specification was designed with the intent of creating an absolutely minimal RAM-footprint Java(tm) VM. As such it is a serious comrpomise, sacrificing a great many of the abilities of CVM and the J2SE? VM in order to bring its in-mmeory size down to a few kilo-bytes of RAM. Sun (and others) builds custom VMs to meet the KVM specification on a client's device.
In such a small memory space the tricks one can play to coax performance out of Java(tm) programs are also severely constrained. In general KVM implementations are the slowest of all Java(tm) VMs by a good margin.
What is CDC Hotspot?
CDC Hotspot is the name being given to the next version of CVM. It is the first version of CVM to include a capable JIT compiler. It gets approixmately 85%-90% the speed of the client version of J2SE? Hotspot 1.4.
What is CLDC Hotspot?
CLDC Hotspot is the release name for a project that was called "Monty" internally. It is a brand new VM designed to replace KVM and written by some of the same people who wrote J2SE? Hotspot. Its is larger then KVM and will not fit into some of the devices that KVM runs in today, but as phones are continuing to grow in capabilities it is expected to be able to run in the low-end of the next generation of phones.
What is J2EE??
Java 2 Enterprise Edition (J2EE?) bears the same basic relationship to the J2SE? Configuration as the J2ME Profiles do to the J2ME Configurations. It is an extended set of APIs and capabiliies that is built ontop of J2SE?. It includes support for Enterpise Java Beans (EJBs), Servlets, and in general all the high-level server-based constructs enterprise developers use to build internet and intranet based services.
-- Main.jeffpk - 04 Dec 2005
|