Download and Install OpenJDK 20 on Windows
- Details
- Written by Nam Ha Minh
- Last Updated on 04 May 2023   |   Print Email
1. Download binary distribution of OpenJDK 20
OpenJDK 20 is distributed as compressed archive files (zip and tar.gz) - no installer or setup program. Head over to JDK 20’s official download page, you will see the following page:For Windows OS, click the hyperlink “zip” next to Windows/x64 as shown in the above screenshot. The result is the zip file openjdk-20.0.1_windows-x64_bin.zip being downloaded on your computer (around 187 MB in file size).Next, you should verify the downloaded by checking SHA256 checksum value. Open a new Command Prompt on Windows, change the current directory to where the file is downloaded, and type the following command:certutil -hashfile openjdk-20.0.1_windows-x64_bin.zip sha256
Then compare the SHA256 checksum value printed by this command against the value published on the official download page (link “sha256” as pointed in the above screenshot). And you can safely process if two values are the same.2. Install OpenJDK 20 on Windows
tar -xf openjdk-20.0.1_windows-x64_bin.zip
The result is a new directory created with the name jdk-20.0.1 - that contains the binary files of OpenJDK 20.Then you need to set the system environment variables JAVA_HOME and PATH in the following form: JAVA_HOME = [Path to OpenJDK directory] PATH = JAVA_HOME\bin + PATHFor detailed instruction about setting up JAVA_HOME environment variable, check this article.Finally, open a new command prompt window and type java -version to verify the installation. You should see the following output:You see, it prints openjdk version “20.0.1” - that means you have installed OpenJDK 20 on Windows successfully. You can also type javac -version to check version of Java compiler. You can also watch the following video to see the steps in action:Learn more:
- How to check Java version
- Java SE versions history
- How to set JAVA_HOME environment variable on Windows 10
- How to set environment variables for Java using command line
- How to write, compile and run a hello world Java program for beginners
- What are JVM, JRE and JDK
Comments