As you can see, there is no installer for OpenJDK for any operating system. It is distributed as compressed ZIP archive file for Windows. Click the link (1) to start downloading the binary distribution of OpenJDK 23. Save the file (openjdk-23.0.1_windows-x64_bin.zip) in the Downloads directory under your user home directory.cd Downloads
Then type the following command:certutil -hashfile openjdk-23.0.1_windows-x64_bin.zip sha256
This prints the SHA256 checksum of the specified file. Compare it to the checksum shown in the link (2) in the download page screenshot above. If they match, you can extract the ZIP file to install the JDK.tar -xf openjdk-23.0.1_windows-x64_bin.zip -C D:\OpenJDK
This command extracts the ZIP file into the OpenJDK directory on the D drive, so the JDK installation directory becomes D:\OpenJDK\jdk-23.0.1.Next, we need to configure a couple of system environment variables, such as JAVA_HOME and Path. To do this, click the Start button, type ‘environment variable’, and click the best match, Edit the system environment variables. In the System Properties dialog, click the Environment Variables button.In the Environment Variables dialog, click the New button under System variables list to create a new variable named JAVA_HOME, as shown below:
Next, edit the Path environment variable and insert a new entry at the beginning of the list, as shown below:
This configuration allows the JDK to be recognized by Java-based applications such as IDEs and servers. Click OK a few times to close the dialogs.For more details about setting environment variables for Java on Windows, check this guide.
This means you have successfully installed OpenJDK 23 on your Windows computer. If you don’t see this output, check the environment variables to ensure they point to the right path. You can also type javac -version to check the version of the Java compiler.Congratulations! You can now start your Java development journey.To see the setup of OpenJDK 23 on Windows in action, watch the following video:
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.