Java versioning and terminology, 1.6 vs 6.0 OpenJDK vs Sun

…衆ロ難τιáo~ 提交于 2019-11-26 17:46:51

问题


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? For example, OpenJDK's latest is 1.6 and Sun's is 6.0?

All these versions are pretty confusing to someone new to Java.


回答1:


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.



回答2:


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:

  • Java SE 6 Platform Name and Version Numbers
  • J2SE Version 1.5.0 or 5.0?
  • J2SE SDK/JRE Version String Naming Convention

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.




回答3:


  • 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.




回答4:


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




回答5:


The only difference is the single digit numbers are usually used in conjunction with Java SE 5 and Java EE 6.

The 1.5 and 1.6 versions are what the Java compiler says using java -version and sometimes 'the minor release' is used as a version string, like SunOS 5.8 was called Solaris 8 as a product name.



来源:https://stackoverflow.com/questions/2411288/java-versioning-and-terminology-1-6-vs-6-0-openjdk-vs-sun

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!