CLOSE

   Java  Java 11  Guide  
   Technology    Programming

Step by Step Guide to Install JDK 11 on Windows

           
 JUNE 19, 2019   by iamabhishek

Oracle has already started rolling out development release for Java 12 and the Java 11 version has been moved to stable release hence it is the right time to start trying it out. In this article we will help you with setting up Java 11 (JDK 11) on your computer.

install jdk 11 on windows

You can wither download the latest version of JDK 11 from the Oracle website: Oracle JDK 11 Download, but you will have to setup Oracle account for downloading it. Or, you can download it from the Adopt Open JDK website (no login required). From the AdoptOpenJDK website, you can also download the .msi installers to setup JDK 11 automatically just like older version.

Both of the versions are stable with Oracle's version being the latest one and AdoptOpen JDK's version being a few releases behind the latest.

Once you have downloaded the JDK 11 zip file (not the executable file, as that is paid now), follow the following steps:

  1. Once you have downloaded the zip file, extract it in the folder C:\Program Files\Java and you will have a new jdk-11.x.x (some version) folder inside which we will have the /bin directory along with other directories.

  2. Now we will set the PATH environment Variable:

    1. Right click on My Computer or This PC(in Windows 10+) and select the option Properties.

    2. A new window with System properties will open. From the left sidebar, click on the option Advanced system settings.

    3. Then click on Environment Variables button on the bottom right corner.

    4. Add the location of the bin folder of the JDK installation (for example, C:\Program Files\Java\jdk-11\bin) to the PATH variable in User Variables.

  3. Setting the JAVA_HOME environment variable:

    1. Under System variable, click new to add a new variable with name JAVA_HOME or if the JAVA_HOME variable exists, select it and click on Edit to edit it.

    2. Now enter the path of JDK installation as value for it (without the bin folder, for example, C:\Program Files\Java\jdk-11)

    3. Click OK and then click on Apply changes.

  4. With this Java's JDK 11 is configured on your system now you need to configure it in your IDE (Eclipse or IntelliJ) and you are all set. In case you are using Eclipse IDE, got to Window → Preferences → Java → Compiler and select 11 for Compiler Compliance Level option and under Window → Preferences → Java → Intalled JREs, click on add and select the JDK 11 folder. Then click on Apply and close.

To see if it worked, open up the Command Prompt and type java -version and see if it prints your newly installed JDK.


SHARE YOUR THOUGHTS WITH US!




       

Made with by Abhishek Ahlawat

© 2019 Studytonight.   All rights reserved.

DMCA.com Protection Status