You can utilize this guide to obtain practical insights on locating and installing the most recent version of Java, comprehending the distinctions between various Java distributions (such as Adoptium, AdoptOpenJdk, Temurin, OpenJDK, OracleJDK, etc.), and obtaining an overview of Java language characteristics encompassing versions 8 to 19.
Practical Information
Let’s begin by addressing common practical inquiries that individuals encounter while selecting an appropriate Java version for their projects.
TL;DR I only need a download link and a brief overview of other aspects. Where do I proceed?
Visit the Adoptium website, opt for the latest release version, download and install it. Then return to this guide for a possible deeper understanding of Java versions.
What's latest version of Java?
As of August 2023, the most recent Java version is Java 20. Java 21 is scheduled for September 2023, Java 22 for March 2024 and so on. The current Long-Term Support (LTS) version of Java is Java 17, released in September 2021.
How to choose the right Java version?
Newer Java versions now adhere to a 6-month release cycle. Consequently, Java 21 is scheduled for September 2023, Java 22 for March 2024, and so forth. In the past, Java release cycles were much lengthier, extending up to 3-5 years. The diagram below illustrates this:

Given the frequent release of new versions, the real-world scenarios for usage are as follows:
- Legacy projects in companies often remain constrained to Java 8. Consequently, you might be forced to use Java 8.
- Certain legacy projects are even bound to Java 1.5 (released in 2004) or 1.6 (released in 2006), which can be challenging.
- If you prioritize using the latest IDEs, frameworks, and build tools for new projects, you can confidently opt for Java 17 (LTS) or even the most recent Java 19.
- Android development constitutes a unique realm where the Java version is essentially confined to Java 7, with a subset of Java 8 features available. Alternatively, you might consider adopting the Kotlin programming language.
Why companies are still using Java 8?
Various reasons contribute to companies remaining attached to Java 8:
- Initial issues with build tools (Maven, Gradle, etc.) and certain libraries when transitioning to Java versions beyond 8. Some build tools, like Maven, would emit “reflective access” warnings during Java project builds, causing a sense of unreadiness despite functional builds.
- Until Java 8, most people predominantly used Oracle’s JDK builds without concerns about licensing. However, Oracle altered its licensing structure in 2019, sparking confusion with articles suggesting that “Java is no longer free”.
According to license modification in 2019, OracleJDK can be employed without charge in development phases; however, utilizing it in production mandates payment to Oracle. In exchange, users gain extended support, including updates to versions, as well as access to a dedicated helpline for addressing any issues related to the Java Virtual Machine.
But now this is no longer an issue, because in September 2021, Oracle implemented the No-Fee Terms and Conditions License, reinstating the freedom of OracleJDK usage beginning with Java 17. However, there are specific constraints associated with this license, which can be explored on the Oracle website, but it may require your considerable time and effort. - Some organizations adhere to a policy of exclusively utilizing LTS versions and rely on OS vendors to supply these builds, which takes time.
- In summary, because of multiple practical and political issues companies are stuck with Java 8.
Why are certain Java versions like 8, also referred to as 1.8?
Java versions prior to 9 followed a different naming convention. Hence, Java 8 can also be denoted as 1.8, and similarly, Java 5 can be referred to as 1.5, and so forth. The output of the ‘java -version‘ command for these versions appeared as follows:

The naming scheme changed with Java 9, coinciding with the shift to time-based releases. Consequently, Java versions are no longer prefixed with 1.x. The version number format was altered to:

What different versions of Java are available ? Which one should I learn?
Java is unique in its exceptional backward compatibility. This implies that a Java 5 or 8 program is guaranteed to function on a Java 8-20 virtual machine, with a few exceptions that aren’t relevant for now.
However, the reverse is not true. If your program relies on Java 20 features, they won’t be accessible on a Java 8 JVM.
This insight leads to several implications:
- Learning a specific Java version, such as Java 12, isn’t sufficient.
- It’s advisable to establish a solid foundation encompassing all language features up to Java 8.
- Then, utilize resources like this guide to explore the additional features introduced in Java 9-20 and incorporate them as needed.
What different features are available across Java versions?
For a comprehensive view of new features spanning Java versions, refer to the Java Features section. As a general guideline:
- The lengthier release cycles of the past (3-5 years, up to Java 8) introduced numerous features in each release.
- The 6-month release cycle now results in fewer features per release, allowing quick familiarization with Java 9-20 language features.
What's is JDK and JRE?
Until now, we’ve discussed “Java” without distinction. However, it’s essential to differentiate between a JRE (Java Runtime Environment) and a JDK (Java Development Kit).
- Back in the old days, if you just wanted to use Java programs, you’d get something called a JRE. It had important stuff like a “brain” for understanding Java (JVM) and a tool called “java” for making things work.
- But for folks who were building new Java programs, they needed a JDK. This package had everything the JRE had, plus extra goodies like a special tool (javac) for turning code into Java programs, and other tools like javadoc to make documentation, and jdb for finding and fixing issues.
Now, you might wonder why I’m employing past tense because prior to Java 8, the Oracle website provided separate downloads for JREs and JDKs, although the JDK consistently included a separate JRE folder. With the advent of Java 9, this distinction began to blur, and the standard download became a JDK. In addition, the structure of JDK directories evolved, eliminating the need for an explicit JRE folder.
While certain distributions (as outlined in the Java Distributions section) may still provide separate JRE downloads, the trend appears to be leaning towards offering just the JDK. Consequently, moving forward, I’ll be using “Java” and “JDK” interchangeably.
Java Distributions
Numerous sites offer Java (JDK) downloads, leading to confusion regarding offerings and licensing. This section clarifies the landscape:
- The OpenJDK project houses the Java source code. However, it isn’t a distributable build. Certain vendors produce builds from this source, which are certified (see TCK) and then distributed.
- Oracle offers OpenJDK builds (free and unbranded) and OracleJDK builds (commercial and branded). The latter was introduced due to licensing changes in 2019.
- Adoptium (formerly AdoptOpenJDK) delivers reliable OpenJDK builds known as Eclipse Temurin, recommended for installation.
- Other options include Azul Zulu, Amazon Corretto, and SAPMachine, each offering varied support guarantees.
To learn more about all the OpenJDK builds you can also checkout OpenJDK Wikipedia site or javaalmanac.
Java Features in Different Versions
This guide provides a swift overview of features introduced across different Java versions:
- Java 8 featured lambdas, method references, functional-style operations for collections via the Stream API, and more.
- Java 9 brought collections enhancements, a revamped HttpClient, Modules with Project Jigsaw, Multi-Release .jar files, and the JShell.
- Java 10 introduced the “var” keyword for local-variable type inference.
- Java 11 included additions to Strings & Files, introduced Run Source Files, and deprecated the Nashorn JavaScript Engine.
- Java 12 featured Unicode 11 support and a preview of switch expressions.
- Java 13 encompassed improvements to Collections, Optionals, Interfaces, JShell, and more.
- Java 14 introduced Records (compact classes), Pattern Matching for instanceof, and helpful NullPointerException messages.
- Java 15 included the Sealed Classes preview and hidden classes.
- Java 16 featured Record patterns, Pattern matching for switch, Vector API (incubator), and Foreign Function & Memory API (incubator).
- Java 17 (LTS) incorporated Pattern Matching for switch (standard), Sealed Classes (standard), and Foreign Function & Memory API (standard).
This summary does not encompass all enhancements but offers a glimpse into the progression of Java features. When adopting a new version, comprehending its advantages is pivotal.
You can use the above information to delve into specific Java versions based on your project requirements. Remember, the choice of Java version depends on the nature of your project, compatibility with existing libraries and tools, and the desired language features.