Download Java 21 LTS

Free Java 21 JDK downloads for Windows, macOS (Apple Silicon and Intel) and Linux, from every trusted OpenJDK vendor. Released September 2023. All downloads go to the official vendor page.

πŸ“… September 2023 🏷 LTS πŸ†“ Free OpenJDK πŸ–₯ Windows Β· Mac Β· Linux

Key features introduced in Java 21: Virtual threads (Project Loom), pattern matching in switch, sequenced collections, record patterns, string templates (preview).

Java 21 β€” Eclipse Temurin

Java 21 β€” Microsoft

Java 21 β€” Amazon Corretto

Java 21 β€” Azul Zulu

Java 21 β€” Oracle

⚠ Oracle JDK requires a paid subscription for commercial production use. For free production use, pick Eclipse Temurin, Microsoft, Amazon Corretto or Azul Zulu above.

After you download Java 21

  1. Run the installer (.msi on Windows, .pkg on macOS) or extract the tarball (.tar.gz on Linux).
  2. On Windows, make sure "Add to PATH" and "Set JAVA_HOME" are checked during install.
  3. Open a new terminal (the old one won't see the updated PATH).
  4. Verify:
    java -version
    # expected: openjdk version "21.x.x"

Detailed per-OS install guides:

Should I pick Java 21?

Yes, for most new projects. Java 21 LTS is the sweet spot in 2026 β€” it adds virtual threads, pattern matching in switch, and sequenced collections, while being supported by Spring Boot 3.x, Quarkus, Micronaut, and every major framework. Free support through at least 2029 from Temurin.

Related downloads