views:

468

answers:

5

I'm having problems understanding java versioning. I'm seeing lots of versions like 1.4.2, 1.5 and 1.6, but I also stumble upon 5.0 and 6.0. I don't understand this versioning or the progression.

I'm pretty new to java, and I've read a bit about openjdk vs sun and I think i understand it. Are these versions the difference between openjdk and sun? ie. openjdk's latest is 1.6 and sun's is 6.0?

All these versions are pretty confusing to a java noob.

+2  A: 
  • Java 1.5.x is the same as java 5.x
  • Java 1.6.x is the same as java 6.x

basically throw away the 1. part of the version number.

Glen
and so there's no difference between openjdk and sun ?? as far as versioning?
brad
I'm pretty sure there never was anything called Java 4. The move to "full" version numbers started with 5.
Michael Borgwardt
@Michael Borgwardt, you're right, fixed.
Glen
@brad, Glen is just answering the version number question. Openjdk and Sun's JVM are two separate JVM implementations.
matt b
do different jvm implementations have to stick to specific versions according to some spec?
brad
There is a difference: version 6 is the product version, while 1.6.0 is the developer version.
Pascal Thivent
+1  A: 

Both 1.6 and 6 are used to refer to the same version (and similarly for 1.5 and 5).

Amit Kumar
thanks for that link, i was searching around, but couldn't find exactly that!
brad
+3  A: 

The versioning is simply a mess:

  • Java 1.0 and 1.1 were normal
  • Then came Java 1.2, but you were supposed to call it "Java 2, JDK 1.2"
  • This continued until 1.4 (There were also minor releases like 1.4.2)
  • The next version was then supposedly "Java 5.0", but there was still "1.5" all over the place in the file names and URLs.
  • Starting with Java 6, they've dropped the minor version and mostly (but not completely, see output of java -version) eliminated the traces of the old versioning scheme, but people have gotten used to it and continue to use it colloquially.
Michael Borgwardt
ya on snow leopard `java -version` gives me "1.6.0_17"which is really what has caused all of my confusion because i read all about 6.0
brad
A: 

The only difference is the single digit numbers are usually used in conjunction with JAVA SE 5 and Java EE 6. The 1.5, 1.6 version is what the java compiler says using java -version and sometimes 'the minor release' is used as version as SunOS 5.8 was called Solaris 8 as product name.

stacker
+7  A: 

This is explained (cough) in Java SE Naming and Versions:

The current release is Java Platform, Standard Edition 6 (Java SE 6). The previous release was Java 2 Platform, Standard Edition 5.0 (J2SE 5.0).

Sun Microsystems simplified the platform name in 2006 to better reflect the level of maturity, stability, scalability, and security built into the Java platform. Sun dropped the "2" from the name and deleted the "dot number" (the number following the period). Any updates to Java platforms will simply be noted as updates rather than adding a "dot number" at the end of the platform name.

Due to significant popularity within the Java developer community, the development kit has reverted back to the name "JDK" from "Java 2 SDK" (or "J2SDK"). The runtime environment has reverted back to "JRE" from "J2RE." (Note that "JDK" stands for "J2SE Development Kit" in version 5.0.)

For more information on platform names and version numbers, see the following pages:

And quoting Java SE 6 Platform Name and Version Numbers:

At this release, the platform name has changed from J2SETM to JavaTM SE. The official name is JavaTM Platform, Standard Edition 6.

Both version numbers (1.6.0 and 6) are used to identify this release of the Java Platform. Version 6 is the product version, while 1.6.0 is the developer version. The number 6 is used to reflect the evolving level of maturity, stability, scalability and security of Java SE.

And J2SE Version 1.5.0 or 5.0?:

Both version numbers "1.5.0" and "5.0" are used to identify this release of the Java 2 Platform Standard Edition. Version "5.0" is the product version, while "1.5.0" is the developer version. The number "5.0" is used to better reflect the level of maturity, stability, scalability and security of the J2SE.

The number "5.0" was arrived at by dropping the leading "1." from "1.5.0". Where you might have expected to see 1.5.0, it is now 5.0 (and where it was 1.5, it is now 5).

So, to summarize, the whole naming is a mess but this is finally over and the current platform name is JavaTM Platform, Standard Edition 6 (abbrev. JavaTM SE 6). Two Products are delivered under the platform: the JDKTM 6 and the JRETM 6.

OpenJDK 6 is an open-source implementation of the Java SE 6 Platform, it's different from Sun's JDK.

Pascal Thivent
And I would argue that we can retroactively now clearly and unambiguously refer to Java 1, Java 2, Java 3, Java 4 and Java 5, being java.version 1.0.x/1.1.x, 1.2.x, 1.3.x, 1.4.x, 1.5.0, respectively.
Software Monkey
Finally over? Let's see how long they manage to stick to it this time...
Michael Borgwardt
Yes, they removed this insane 2 in J2SE so *this* insanity is finally over.
Pascal Thivent
@Michael Borgwardt Since Solaris was more messy http://en.wikipedia.org/wiki/Solaris_%28operating_system%29 ,the question is what oracle will introduce ;-)
stacker
It should be noted that the OpenJDK version shipped by Red Hat, Fedora, et al has passed the Java TCK certifying them as valid/correct runtimes, unlike most (all?) other open source JDK implementations.
Ophidian