The General Availability (GA) date for Java JDK 21, the latest Long Term Supported (LTS) version of Java is 19th September 2023, which is less than a month from now.
But if you are curious to understand and try out Java 21, you can do so by downloading the latest OpenJDK JDK 21 Release-Candidate builds
Links to OpenJDK JDK 21 Release-Candidates for all Operating Systems
Linux / AArch64 | tar.gz (sha256) | 201583910 |
---|---|---|
Linux / x64 | tar.gz (sha256) | 203348211 |
macOS / AArch64 | tar.gz (sha256) | 197305058 |
macOS / x64 | tar.gz (sha256) | 199663920 |
Windows / x64 | zip (sha256) | 201151266 |
As I make use of an ARM-based M1 Macbook, I downloaded the macOS / AArch64 and extracted the .tz file in my download's folder,
% pwd
/Users/c2ctech/Downloads/jdk-21.jdk/Contents/Home/bin
% ./java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35-2513)
OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)
As the tradition goes, let's try out the "Hello World!" example.
public class HelloWorldJdk21 {
public static void main(String... args) {
System.out.println("Hello World from Java JDK 21!");
}
}
% ./java HelloWorldJdk21.java
Hello World from Java JDK 21!
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- Installing Java JDK 21 Final Release Candidate
- Steps to Install Java 21 (LTS JDK) on Windows 11
- How to install and Use Java JDK 21 Initial Release Candidate
- How to Enable Java JDK 21 Preview Features on IntelliJ
- Setting Up VS Code with Java JDK 21
- Java JDK 21 LTS Version Release Date (General Availability)
- [JEP 430] Java JDK 21 New Feature - String Templates (Preview)
- How to use Java JDK 21 with IntelliJ
- Java JDK 21: JEP 439 - An Improved Generational Z Garbage Collector (ZGC)
- [JEP 431] Java JDK 21 New Feature - Sequenced Collections
- Java JDK 21 - The Latest LTS Version
- Java JDK 21 - JEP 440 - Record Patterns
- Fix - Unsupported major.minor version 65.0 (Java JDK 21)
- [Hibernate] The method buildSessionFactory() from the type Configuration is deprecated - Java
- [Fixed] Git Clone git@github.com: Permission denied (publickey) Could not read from remote repository Fatal error - Git
- How to update Python Version on Mac (macOS) - MacOS
- [Android] Sharing Multiple Images to Twitter App from your App - Twitter
- Android : Prevent App for rotation landscape or portrait - Android
- How to know my IP on Mac Ventura 13.0 - MacOS
- How to Enable Dark Mode Theme in Microsoft Teams - Teams
- CentOS Cannot find a valid baseurl for repo base7x86_64 yum - HowTos