The Java JDK, its releases and various offerings

The Java JDK, its releases and various offerings

A brief history of Java as a programming language

Before it became Java

Java was created at Sun Microsystems, Inc. by a team of researchers led by James Gosling. The goal was to create a language that could run on consumer electronics products. A few years earlier, James Gosling was part of a team that developed a new language (called Oak) which was used to build a remote controller that controlled a whole living room equipment, and was independent of the processor it was running on.

Then it became Java

In January 1993, the Mosaic browser was released, and it was instrumental in popularizing the World Wide Web (WWW) and the Internet in general. The team thought to use the network the Internet provided to position the language. The language was subsequently called Java (after James Gosling’s most favorite coffee drink), and its first beta version was released in 1995 as JDK Beta.

A brief explanation of JDK, JVM and JRE

JDK

JDK, meaning Java Development Kit, is Java’s SDK (Software Development Kit) and it is basically the set of libraries, APIs, packages or tools that serves as building blocks for writing, building and running Java programs. On one hand, it ensures that the developer does not write all the basic codes needed by the program. The developer just focuses on using already coded building blocks to write the program. For example, a developer does not need to write the basic code for an array if the program requires that data structure, instead the developer can use the ArrayList class in the package java.util which is already in the JDK.

JVM

JVM, meaning Java Virtual Machine, is the virtual machine installed on a host machine. It helps the host machine to run Java programs that have already been converted to bytecode by the Java compiler (JAVAC). Java is a compiled and interpreted language. The JAVAC compiles the Java codes into bytecodes. The JVM converts these bytecodes to machine codes so that the host machine can run them. It is the JVM that makes Java a language that is platform independent. The famous marketing slogan “write once run anywhere” is made possible by the JVM. It is usually installed with the JDK on MAC, Windows or Linux and serves as the intermediary between the Java bytecodes and the host machine. The JVM also runs programs written in other languages that are compiled to Java bytecodes.

JRE

JVM as a specification is developed under the Java Community Process. It defines the set of rules that must be adhered to in order to have an implementation of the JVM. JRE (Java Runtime Environment) is an implementation of the JVM specification. The specification omits some rules like the algorithm used in Garbage Collection so as not to constrain implementers.

How JDK versions used to be released

00F2B235-C267-42C8-A678-8F9A72ECB838.jpeg (Image source: Wikipedia)

It’s evident from the image above that from 1998 when JDK (then J2SE version 1.2) was released, it took an average of two years for new versions to be released. But when Java SE 6 was released in December 2016, it took approximately 5 years for the next JDK - Java SE 7 to be released (in July 2011). And it took 3 years to release Java SE 8 and another 3 years to release JDK 9.

How JDK versions are released now

In September 2017, Mark Reinhold, the Chief Architect of the Java Platform proposed the new release schedule. Since Java SE 10 (18.3) one can expect new release of the JDK every six months (March and September of every year), however, not all the released versions will be LTS (Long Term Support) versions meaning that a release that is not an LTS will only receive updates for six months until the next release replaces it. According to this new release cadence, one can expect LTS versions every three years. The current LTS version is Java SE 17 (21.9) which was released in September 2021. Updates and support for LTS versions are usually available for three years and possibly more depending on your vendor. One of the benefits of this new release cadence is that developers do not have to wait for three years before they can test new features on Java. And also according to the body stewarding Java, this new release cadence has helped in better project management. As opposed to having small features or small improvements in either the JDK itself or other tools like the JVM waiting for big features to be released, this new release schedule ensures that small features are released early while bigger features can remain in development.

What is OpenJDK?

In simple terms, there are two “flavours” of the Java JDK. They are:

  • Oracle’s commercial Java SE JDK
  • The free open-source JDK called OpenJDK.

The OpenJDK is the free and open-source implementation of Java SE JDK and it is licensed GNU-GPL2.0 with Classpath linking exceptions. Ordinarily, the GNU GPL (General Public License) is the open source license that ensures that any software built using an open source component (regardless of the percentage of the component in the whole software) is subject to be seen as an open source software and can be used or released without proprietary issues. The GPL with the Classpath linking exception allows software to be built using open source components without risking the integrity of your Intellectual Property. In other words, one is not obligated to release the source code of their software built with OpenJDK. OpenJDK is the product of Sun Microsystems’ effort to make Java open-source.

The OpenJDK has made it possible for various vendors to implement their own offerings of the Java SE JDK. Vendors like Amazon, Azul Systems, IBM, AliBaba, Redhat, AdoptOpenJDK and so on.

The various OpenJDK vendors

OpenJDK vendors are the various companies that release various offerings for the JDK. It used to be just Sun releasing single versions of JDK. Now we have other companies releasing multiple versions of JDK. With so many vendors having their own offerings, one is left confused as to which to use. Some of the OpenJDK offerings from vendors are:

Amazon Corretto

Amazon Corretto as the name implies is Amazon’s offering of the OpenJDK. It’s a no-cost production-ready distribution of the OpenJDK, and it comes with Long Term Support. Presently, it has four versions:

  • Amazon Corretto 8
  • Amazon Corretto 11
  • Amazon Corretto 17
  • Amazon Corretto 18

There are numerous benefits to using Amazon Corretto. To mention but a few:

  • It’s free.
  • All versions are LTS, so one can choose any version of choice and stick with it.
  • It’s backed by Amazon who uses it on thousand of production services.
  • It enables one to run the same environment both on-site and in the cloud.

To download Amazon Corretto - aws.amazon.com/corretto

AdoptOpenJDK

AdoptOpenJDK, now Temurin, is a free distribution of the OpenJDK stewarded by Eclipse Foundation’s Adoptium Working Group. It offers the option to choose between two JVMs:

  • The HotSpot JVM
  • OpenJ9

To download the latest version of AdoptOpenJDK (Temurin) - adoptium.net

There are other distributions from RedHat, Azul Systems (they have the paid but powerful JVM - Azul Platform Prime formerly called Zing) and, of course, an offering from Oracle.