The Java Development Kit(JDK) allows you to code and run Java programs. In this tutorial, we show you how to install Java 11 on Windows and set up the environment variable JAVA_HOME
Follow the below steps to download Java:
1. Refer to the link to download JDK11. Here, I have a 64-bit system and windows operating system, so I selected – jdk-22.214.171.124_windows-x64_bin.exe
2. Click on the name – jdk-11.0.816.1_windows-x64_bin.exe, and a dialog box as shown below will appear.
3. If you do not have an Oracle account, then go to the AdoptOpenJDK link . AdoptOpenJDK uses infrastructure, build and test scripts to produce prebuilt binaries from OpenJDK™ class libraries and a choice of either OpenJDK or the Eclipse OpenJ9 VM. All AdoptOpenJDK binaries and scripts are open sources licensed and available free.
Select appropriate version and JVM.
Here, I have selected Version – OpenJDK 11 and JVM as HotSpot. Click on the blue download button. It will take you to the new location.
4. Select the appropriate Operating System, Architecture, Package Type & Version. I have selected OS as Windows, Architecture as x64, Package Type as JDK, and Version as 11. Select the .zip extension and download the exe.
5. Once the file is downloaded, Right-click and extract the files to the desired location. I have placed it in C: driver under Program Files.
How to set Java JDK 11 Path in Windows 10?
1. Type – “View Advance” in the search option and we will see the option – View Advanced system setting.
2. In System Properties dialog, select Advanced tab and click on the Environment Variables button.
3. In “Environment variables” dialog, System variables, Click on the New button and add a JAVA_HOME variable and Variable value – mention the path where Java folder places.
4. Update System Path – In “Environment Variables” window under “System variables” select Path, click Edit and add path of java with bin.
5. To verify, if JAVA is installed properly or not, open command prompt and type
java - version
6. To verify, if JAVA_HOME is configured properly or not, open command prompt and type