Skip to Content

What is the Java latest version?

Java is one of the most popular programming languages used by developers around the world. Originally created by James Gosling at Sun Microsystems in the 1990s, Java has gone through many updates and revisions over the past 25+ years. But what is the latest stable version of Java that developers should be using today?

A Brief History of Java

The first version of Java was released in 1996 as Java 1.0. This was followed by several major updates like Java 1.1, Java 2 (Java 1.2), Java 3 (Java 1.3), and so on. Some of the major Java versions included:

  • Java 1.0 – Released in 1996
  • Java 1.1 – Released in 1997
  • Java 2 (Java 1.2) – Released in 1998
  • Java 3 (Java 1.3) – Released in 2000
  • Java 4 (Java 1.4) – Released in 2002
  • Java 5 (Java 1.5) – Released in 2004
  • Java 6 (Java 1.6) – Released in 2006
  • Java 7 (Java 1.7) – Released in 2011
  • Java 8 (Java 1.8) – Released in 2014
  • Java 9 – Released in 2017
  • Java 10 – Released in 2018
  • Java 11 – Released in 2018
  • Java 12 – Released in 2019
  • Java 13 – Released in 2019
  • Java 14 – Released in 2020
  • Java 15 – Released in 2020
  • Java 16 – Released in 2021
  • Java 17 – Released in 2021
  • Java 18 – Released in 2022
  • Java 19 – Released in 2022

As you can see, Java has gone through many major and minor releases over the past 25+ years. But not all versions are supported at the same time. Oracle (who took over Java development from Sun Microsystems) has a phased-out policy where only certain recent Java versions are officially supported and receive public updates.

Java Version Support Timelines

Oracle groups Java versions into several support timelines:

  • Short-Term Support (STS) – Last for 6 months and includes minor updates.
  • Long-Term Support (LTS) – Last for several years and includes performance enhancements and security patches.
  • Medium-Term Support (MTS) – Last for longer than STS but not as long as LTS.
  • Extended Support – Extra support for a fee after public updates have ended.

The most recent Java versions follow this support model:

Version Release Date Support Timeline Public Updates End
Java 17 September 2021 LTS September 2029
Java 18 March 2022 STS September 2022
Java 19 September 2022 MTS March 2024

As you can see, Java 17 is the current Long-Term Support (LTS) version that is supported until September 2029. Java 18 is a Short-Term Support (STS) release supported only until September 2022. And Java 19 is the newest version released in September 2022 under Medium-Term Support (MTS) until March 2024.

Key Features in Recent Versions

Now that we’ve seen the release timeline, let’s look at some of the key features added in recent Java versions:

Java 9

  • Introduced the Java Module System
  • Added JShell – Java REPL tool
  • Improved the Process API
  • Added factory methods for immutable List, Set, Map

Java 10

  • Introduced type inference for local variables
  • Added the Garbage Collector Interface
  • Performance improvements with G1 GC

Java 11

  • Long-term support release
  • Lambda parameters in JavaDoc
  • New HTTP client API
  • Improved GC and syntax for var

Java 12

  • Switch expressions
  • Shenandoah GC
  • Microbenchmark suite
  • JVM constants API

Java 13

  • Switch expressions updates
  • Text blocks for strings
  • Reimplemented Socket API
  • Updated GC algorithms

Java 14

  • NUMA-aware memory allocation
  • NullPointerExceptions
  • Record syntax for classes
  • Helpful NPEs

Java 15

  • Sealed classes and interfaces
  • Hidden classes
  • Text blocks updates
  • Foreign memory access API

As you can see, despite Java’s maturity, new versions continue to bring useful upgrades like new APIs, performance improvements, and language features.

Why Use the Latest Java Version?

There are several reasons why developers should use the latest Java version in development and production where possible:

  • Performance Improvements – Newer versions contain better garbage collection algorithms, faster input/output APIs, and general performance tuning.
  • Security Fixes – Bug fixes and security patches are only released for supported Java versions.
  • New APIs & Language Features – To utilize the newest capabilities and syntax additions.
  • Future Proofing – Support timelines mean later upgrades can require more code changes.
  • Compatibility – New tools and frameworks require recent Java versions.

Using non-supported Java versions can expose applications to unfixed security vulnerabilities and miss out on stability and features. But you still need to test upgrades thoroughly before migrating production systems. However, for new developments, the latest LTS version is typically the best choice.

Conclusion

The current Long-Term Support version of Java is Java 17, released in September 2021. This version will receive public updates and support until September 2029. Java 18 is a short-term support release while Java 19 is the newest version under medium-term support.

In general, for production applications, developers should standardize on the latest Java LTS version like Java 17 to leverage performance improvements, security fixes, and new features. However, you need to test upgrades properly before changing Java versions in critical systems. For new developments, using the most recent LTS version is recommended.

Java continues to evolve with new versions released every 6 months. But with Oracle’s support timelines, you don’t have to upgrade all your systems with each new release. Understanding the differences between LTS, STS, and MTS allows selecting the right Java versions for your needs.