A picture that Java programmers must see, it is recommended to look at it secretly! Unlock a wave of new poses!

Today, I want to use a picture to prove that you really don’t understand Java! If you don't believe me, just take a look!


Where is the picture?

Insert picture description here


This is the picture. Someone wants to say, what? Isn't this a picture that introduces the history of Java versions? What's the matter, dare to say that I don't understand Java? Don't worry, listen to Brother Qing slowly telling you, make sure you doubt yourself!

What is LTS?

First of all, the first question is that there are versions marked with LTS in this picture, such as the following:

  1. Java SE 8 (LTS)
  2. Java SE 11 (LTS)
  3. Java SE 17 (LTS)

What does this mean? This is not simple. This is the long-term support version of Java. Yes, LTS stands for the long-term support version. At present, Java 8 and 11 that have been released in Java are the long-term support versions. Then, do you know the release cycle of the long-term support version?

Let's take a look at the release time of the three current long-term support versions:

  1. Java 8 was released in 2014
  2. Java 11 was released in 2018
  3. Java 17 is about to be released in 2021 this year

So what do you say is the release cycle of the Java long-term support version? Four years or three years? Let me tell you, it is three years . How can it prove that we can find the explanation on the official website: see the picture

Insert picture description here

The above description appears in the "oracle Java SE support roadmap" on the oracle official website, which is here:

Insert picture description here


The address is: https://www.oracle.com/java/technologies/java-se-support-roadmap.html

Ok, now we understand that the long-term support version of Java is released every three years. This year, the upcoming Java17 in September 2021 is a new long-term support version!

Java version released

Knowing the release cycle of the long-term support version, what about the others? In fact, the version of Java has this classification:

  1. Feature version, such as Java 8u20
  2. Functional version, such as Java 8u40
  3. Major version, such as LTS

Then we know what the main version of LTS is, mainly this feature version and function version, which can be understood in one sentence:

The functional version is the final release of Java8, Java9, Java10...

In addition, you also need to know that for the functional version, we can call it a non-LTS version. Here is a picture:

Insert picture description here


It can be seen that the non-LTS version is released every six months, that is, every six months, but it only started after Java 9. Why, look at our original picture, you can see here:

Insert picture description here


Have you seen it? Since J2SE 1.2, Sun has basically released a new version of Java every two years, but why is it that nearly five years have passed since Java 6 was released?

There is a scrutiny of sentence value on Wikipedia;

After the release of Java 7, Oracle promised to return to the previous release cycle of once every two years.

What's going on, there is a story in it, look at a picture I compiled:

Insert picture description here


Until Java6, it was dominated by Sun. The reason why Java7 was released in 2011 was because it was acquired by Oracle due to the unfavorable business of Sun. That is, it was acquired by Oracle in 2009. After the acquisition, Java 7 was released in 2011. Of course, at this time, Oracle is no longer the Sun company!

Oracle accepts Java

After Sun was acquired by Oracle, it released Java 7 in 2011. This year, Oracle promised to return to the previous release cycle of once every two years. However, when it was approaching 2013, Oracle announced that the release of Java was postponed, saying that there were vulnerabilities that were being fixed, so Java 8 was finally released in 2014.

That is, it is three years after Java7 to Java8, and it is also three years after the release of Java9. It was released in 2017. Does this mean that Oracle no longer follows the release every two years before Sun, but Is it released every three years?

Things have turned around. After the release of Java9 in 2017, Mark Reinhold, the main architect of the Java platform, issued a proposal to reduce the Java feature update cycle from a new version every two years to a new version every six months. The proposal was passed and became effective shortly after it was proposed.

So since Java9, a new version has been released every 6 months, but the idea that Oracle wants to release a version every three years has not been dispelled, so care, you guessed it, is the release cycle of the LTS version...

OpenJDK

In this process, a very important community organization was born, that is, OpenJDK. What is this?

Continue to look at this picture:

Insert picture description here


Before Sun was acquired by Oracle, Sun decided to open source Java at the JavaOne conference in 2006, and officially released OpenJDK on April 15, 2009. Oracle also took over the project after acquiring Sun.

This is what we know as OpenJDK. Then I believe you must have such a question?

What is the difference between JDK and OpenJDK

We generally say that JDK refers to oracle JDK since sun was acquired by oracle. What is the difference between this and OpenJDK?

The Java Development Kit (JDK) was developed by Sun Company. In 2006, Sun Company decided to open source it. However , part of the source code in the JDK is commercial source code, that is, not all the source code in the JDK is Sun Company's . Then this piece of code Sun has no right to open source it. These codes are called some features of closed source, but Sun still said that these closed source features were removed and the JDK source code was open sourced.

But because the open source code lacks some closed source features, that is, some functions provided by commercial code are missing, what should we do? The approach taken was to find an open source code with the same function to replace it, so OpenJDK was achieved.

Later, didn’t oracle acquired sun, this OpenJDK naturally belonged to Oracle, so oracle added some additional features on the basis of OpenJDK, so it became the oracle JDK, which is what we generally say today JDK, in fact , there is no major technical difference between Oracle JDK and OpenJDK, but Oracle JDK has added some functions specifically , but OpenJDK contains all the core functions of the JDK created by Sun company before, and because of this operation of Oracle , Oracle JDK has become a commercial version, used in a production environment, fortunately, to avoid some risks, while OpenJDK is a free trial and the source code is open!

Having said that, do you know the difference between Oracle JDK (JDK for short) and OpenJDK?

OpenJDK only includes the most core functions in the JDK, some non-core functions in the JDK are not included in OpenJDK, such as some commercial functions and additional features added by oracle.

It can be said that OpenJDK is a minimalist version of JDK, and there is another important point of knowledge:

The JDK we generally refer to is Oracle's JDK. Every time a new version of the JDK is released, the update in OpenJDK is added to its own private part to form the final new version of the JDK.

For example, the upcoming Java17 is currently not available on Oracle. The latest Java17 related information is on OpenJDK. Look at:

Insert picture description here

Different vendors of JDK

Through the above description, we know that OpenJDK is the core that contains most of the original JDK, and the JDK now refers to the oracle JDK formed by Oracle plus private features on top of OpenJDK, because now OpenJDK is dominated by oracle, then oracle JDK also enjoys privileges and is called JDK directly.

But anyway, OpenJDK is open source. Not only can you take it and add private features to form your oracle JDK, other vendors can also do this, such as the following:

  1. AdoptOpenJDK: semi-official, this one is maintained by the OpenJDK community
  2. Amazon (Amazon) Corretto JDK
  3. Ali Dragonwell JDK
  4. Tencent Kona JDK
  5. Huawei Bisheng JDK

Wait... its essence is built with OpenJDK plus private features!

JDK download mirror

We usually download JDK from the official website of Oracle. After all, this is the official palace. However, due to some S operations of Oracle and some other reasons, the download is abnormally slow. Sometimes, in order to solve this problem, there are many good JDKs in China. Download the mirror website, here are a few recommended:

  1. Whoosh download the java jdk mirror: http://www.sousou88.com/spec/java.html
  2. Tsinghua AdoptOpenJDK mirror: https://mirrors.tuna.tsinghua.edu.cn/AdoptOpenJDK/
  3. Huawei java-jdk mirror: https://repo.huaweicloud.com/java/jdk/
  4. Mirror distribution of various JAVA JDK: https://www.injdk.cn/

Ok, that's it for today's sharing. So, after reading this article, have you gained knowledge?