Download & Install OpenJDK 18 on Windows
- Details
- Written by Nam Ha Minh
- Last Updated on 15 April 2022   |   Print Email
1. Download binary distribution of OpenJDK 18
Click this link to visit the official download page of OpenJDK 18. Then click on the Windows/x64 zip link to download the binary distribution of OpenJDK 18, as shown below:You’ll get the file openjdk-18_windows-x64_bin.zip downloaded. But before installation, you should verify the integrity of this file. Open a new command prompt window, change the current directory to the one containing the file. Then type the following command:certutil -hashfile openjdk-18_windows-x64_bin.zip sha256
Compare the returned SHA256 checksum against the one published in the sha256 link (next to the zip link). If they are the same, you can proceed to install OpenJDK 18 safely.
2. Install OpenJDK 18 on Windows
Extract the downloaded zip file into a separate directory, e.g. D:\OpenJDK18. Then you need to update the system environment variables JAVA_HOME and PATH in the following way: JAVA_HOME = D:\OpenJDK18\jdk-18setx -m JAVA_HOME "G:\OpenJDK18\jdk-18"
setx -m PATH "%JAVA_HOME%\bin;%PATH%";
Then open another command prompt to verify OpenJDK 18 installation. Type the java -version and javac -version commands:If you see the result like this, that means you have successfully installed OpenJDK 18 on your Windows computer.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