How to Install OpenJDK (Any Version) on Windows (Any Version)
This tutorial will guide you on how to download and install any version of OpenJDK on any Windows operating system.
OpenJDK (Open Java Development Kit) is a free and open-source implementation of the Java Standard Edition (Java SE). It is license under GNU General Public License (GNU GPL or simply GPL).
Follow these steps to download and install OpenJDK on Windows:
- Go to the official download page for OpenJDK at here.
- On the left side of the page, you'll see a menu called "Reference Implementations". From that menu, choose the version of OpenJDK you want to download.
- Once you've selected the version, look for a link that says "Windows/x64 binary bundle download." This link is for downloading OpenJDK specifically for Windows operating system and 64-bit architecture. For example:
- Click on that link to start the download.
- Once you have downloaded the file, you need to extract it and move it to the C: drive inside the Program Files directory. Here's an example for OpenJDK 11:
- Now, set up an environment variable for Java.
- Type env in the search bar and click on the shortcut that says "Edit the system environment variables." You can find this shortcut by referring to the image below:
- On the System Properties window, click Environment Variables button.
- Under System variables, click New.
- Enter JAVA_HOME in the Variable name field. Browse and select the Java installation directory in the Variable value field as shown in the example below:
- Select Path under System Variables and click on the New button to set path for the Java and enter %JAVA_HOME%\bin as shown in the image below:
- Choose OK button.
- Open a command prompt and run java --version command. This command will show you the version of OpenJDK that is currently installed on your computer.
Congratulations, you have successfully downloaded and installed the OpenJDK on your Windows. You can now start using Java for development purposes.