Java Tutorial · Java Basics · Lesson 12 of 37

Java History & Versions

How Java grew from a project for TV set-top boxes into one of the most used enterprise languages, every major release from 1.0 to Java 27 on one timeline, the LTS release model, and which version to use today.

How Java started

In 1991 a small team at Sun Microsystems led by James Gosling, the "Green Project", set out to build software for consumer devices such as interactive TV set-top boxes. Those devices used many different chips, so the team designed a language whose programs compile to bytecode for a virtual machine instead of to one processor's machine code. The language was first called Oak, after a tree outside Gosling's office, and was renamed Java in 1995.

The TV market did not take off, but the web did. Sun launched Java in 1995 with the promise "write once, run anywhere", and JDK 1.0 was released on 23 January 1996. Its C-like syntax, automatic memory management (garbage collection), built-in threads and large standard library made it the default language for enterprise servers and, later, for Android apps.

Sun made Java open source as OpenJDK in 2006–2007, and Oracle acquired Sun in 2010. Today Java evolves through JEPs (JDK Enhancement Proposals) in the OpenJDK community, and free, production-ready builds are available from several vendors (Eclipse Temurin, Amazon Corretto, Microsoft, Azul and others).

Timeline of major versions

The support dates below are for free Eclipse Temurin builds. Oracle and other vendors offer their own, often longer, commercial support.

  1. Java 27Current
    • G1 becomes the default garbage collector everywhere (JEP 523); compact object headers on by default (JEP 534)
    • Post-quantum hybrid key exchange for TLS 1.3 (JEP 527)
  2. Java 26End of life · Sep 2026
    • HTTP/3 in the HTTP client (JEP 517); the Applet API removed (JEP 504); ahead-of-time object caching with any GC (JEP 516)
  3. Java 25LTS until Sep 2031
    • Compact source files and instance main methods: void main() { IO.println("Hi"); } (JEP 512)
    • Module import declarations (JEP 511), flexible constructor bodies (JEP 513), scoped values (JEP 506), compact object headers (JEP 519)
  4. Java 24End of life · Sep 2025
    • Stream gatherers for custom stream operations (JEP 485) and the Class-File API (JEP 484)
  5. Java 22End of life · Sep 2024
    • Unnamed variables _ (JEP 456) and the Foreign Function & Memory API (JEP 454)
  6. Java 21LTS until Dec 2029
    • Virtual threads for cheap, massive concurrency (JEP 444)
    • Pattern matching for switch and record patterns (JEP 441, JEP 440); sequenced collections (JEP 431)
  7. Java 17LTS until Oct 2027
    • Sealed classes (JEP 409); includes records, text blocks and pattern matching for instanceof from Java 14–16
  8. Java 16End of life · Sep 2021
    • Records record Point(int x, int y) {} (JEP 395) and pattern matching for instanceof (JEP 394)
  9. Java 14End of life · Sep 2020
    • Switch expressions with -> (JEP 361) and helpful NullPointerException messages
  10. Java 11LTS until Oct 2027
    • The standard HTTP client, running a single source file with java Hello.java, String helpers such as isBlank()
  11. Java 10End of life · Sep 2018
    • Local variable type inference with var; the first release on the six-month cadence
  12. Java 9End of life · Mar 2018
    • The module system (Project Jigsaw) and the jshell REPL
  13. Java 8LTS until Dec 2030
    • Lambdas and streams, the java.time date/time API, Optional, default methods in interfaces
  14. Java 7Historic
    • try-with-resources, the diamond operator <>, strings in switch, NIO.2 file API
  15. Java 5.0Historic
    • Generics, annotations, enums, autoboxing, the enhanced for loop and varargs
  16. Java 1.2Historic
    • The Collections Framework (List, Map, …) and the Swing GUI toolkit; marketed as "Java 2"
  17. Java 1.0Historic
    • The first JDK: "write once, run anywhere"

How Java modernized

  • Faster releases. Until Java 9, a release took two to five years. Since Java 10 (2018), a new version ships every March and September, so features arrive in small steps instead of huge jumps.
  • Long-term support (LTS). Most companies run LTS versions: 8, 11, 17, 21 and 25. Since Java 17, an LTS version arrives every two years, so the next one is Java 29 in September 2027.
  • Preview features. New language features first ship as previews that you enable with --enable-preview, get feedback, and become final a few releases later.
  • Less boilerplate. var (10), switch expressions (14), text blocks (15), records (16), pattern matching (16–21) and compact source files (25) made Java much shorter to write.
  • Modern concurrency. Virtual threads (21) let a server handle millions of concurrent tasks with simple, blocking-style code.

Java 8 vs 11 vs 17 vs 21 vs 25

Topic Java 8 Java 11 Java 17 Java 21 Java 25
Lambdas and streams ✓ ✓ ✓ ✓ ✓
var local variables — ✓ ✓ ✓ ✓
Built-in HTTP client — ✓ ✓ ✓ ✓
Records and text blocks — — ✓ ✓ ✓
Sealed classes — — ✓ ✓ ✓
Pattern matching for switch — — — ✓ ✓
Virtual threads — — — ✓ ✓
void main() without a class — — — — ✓
Free Temurin updates until Dec 2030 Oct 2027 Oct 2027 Dec 2029 Sep 2031

Which version should you use?

  • New projects: Java 25, the latest LTS. Choose a non-LTS release (26, 27) only if you are ready to upgrade every six months.
  • Existing projects: move off Java 8 and 11 when you can; Java 21 or 25 bring big gains in performance, language features and garbage collection.
  • This tutorial: examples are compiled and run with JDK 21 when we build the lessons, and their real output is shown under each example. Java examples can't run in your browser.

Official resources

Last reviewed 21 October 2026. Release and support dates come from the official release pages linked above.