Signup/Sign In

Step by Step Guide to Install Java JDK 11 on Windows

Posted in Programming   LAST UPDATED: APRIL 27, 2023

    Oracle has already started rolling out development releases 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

    How to Install Java JDK 11 on Windows

    You can either download the latest version of JDK 11 from the Oracle website: Oracle JDK 11 Download, but you will have to set up an 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 set up JDK 11 automatically just like the 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 the Environment Variables button in 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 the 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 the JDK installation as a 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, go to Window → Preferences → Java → Compiler and select 11 for the Compiler Compliance Level option, and under Window → Preferences → Java → Installed 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.

    You may also like:

    About the author:
    I like writing content about C/C++, DBMS, Java, Docker, general How-tos, Linux, PHP, Java, Go lang, Cloud, and Web development. I have 10 years of diverse experience in software development. Founder @ Studytonight
    IF YOU LIKE IT, THEN SHARE IT
     

    RELATED POSTS