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.setx -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.
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.