Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
412 views
in Technique[技术] by (71.8m points)

Java versioning and terminology, 1.6 vs 6.0 OpenJDK vs Sun

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.
  • Starting with Java 9 or 10, the 1.X notation also disappeared from the output of java -version (which caused some code that depended on parsing it to break), and people have pretty much stopped using it. We now have Java 15, Java 16, Java 17, etc.

Note also that when this question was asked, Sun JDK and OpenJDK were separate codebases (whith a large overlap), and Sun JDK was the official reference implementation.

In the more than 10 years since then, Java was sold to Oracle, OpenJDK became the official Java reference implementation, and Oracle stopped maintaining the Oracle JDK as a separate codebase. Instead, they just provide OpenJDK builds and provide commercial long term support for them with bugfixes and security patches. But you can also get builds for free from AdoptOpenJDK (which recently rebranded as "Adoptium"), they just aren't supported as long.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...