Install Java on Windows 10/11

In this tutorial, we will show you how to install both Oracle and OpenJDK on Windows System. Installing Java basically involves downloading, installing, and verifying the Java version.

Installing Oracle Java

Follow the steps below to install Oracle Java on Windows:

  1. The new Oracle policy requires you to have an Oracle account before you can download Oracle Java. If you do not already have an Oracle account then you can Create a new Oracle Account here. After creating an Oracle account, verify your email.
  2. Open a browser and go to https://www.oracle.com/java/technologies/downloads/archive.
  3. Look for Java SE downloads list. From that list, select the Java version that you wish to download.
  4. Find Windows x64 Installer (.exe) file and click on the download link.
  5. Next, review and accept the Oracle Technology Network License Agreement for Oracle Java SE and then click on the download button. You'll be redirected to the oracle login page. Sign-in into your Oracle account. When the download dialog box appears prompting you to run or save the file, choose to save the file to install it later.
  6. Once the download is complete, open the .exe file by double-clicking on it.
  7. Follow the on-screen instructions to complete the JDK installation process.
  8. After the installation is completed, you can verify if the JDK is installed correctly. To do this, open the Terminal. Type java -version and press Enter. It should display the installed Java version information as shown in the example below:
java 11.0.13 2021-10-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

Congratulations, you have successfully downloaded and installed the JDK on your Windows System. You can now start using Java for development purposes.


Installing OpenJDK

To install OpenJDK on Windows, follow the steps mention here.