In this post, I will guide you to setup Java 11 on Windows operating system by downloading and installing Java Development Kit (JDK) version 11 from Oracle. You know, Oracle released Java 11 builds under two different licenses: Oracle JDK (commercial build with Oracle Technology Network license) and OpenJDK (open source build with GNU General Public license).

 

1. Download and Install Oracle JDK 11

Oracle JDK 11 is the first LTS (Long Term Support) Java Development Kit since Oracle changed Java release cadence to every 6 months. According to Oracle, JDK 11 will be supported (commercial support) until September 2026.

Head to Java SE Development Kit 11 Downloads page and choose the download file appropriate to your operating system. Oracle JDK 11 comes with installers for Linux (rpm and deb), macOS (dmg), Windows (exe) and archive files (tar.gz and zip).

For Windows, I recommend to download the file jdk-11.0.7_windows-x64_bin.exe. Note that you must have an Oracle account to be able to download JDK 11 installer. If not, creating one is free.

Run the downloaded file, and you will see the JDK 11 setup program appears:

jdk 11 setup

Just click Next twice to proceed installation with the defaults.

Note that Oracle JDK 11 does not update system environment variables, so you have to manually update PATH and/or JAVA_HOME after installation. Open Command Prompt window under administrator privilege and type the following command:

setx -m JAVA_HOME "C:\Program Files\Java\jdk-11.0.7"



If the PATH environment variable does not contain an entry to JAVA_HOME\bin, type the following command:

setx -m PATH "%JAVA_HOME%\bin;%PATH%"

Then open another command prompt window and type java –version, you will see:

java 11 version

That means you have successfully installed and configured Oracle JDK 11 on your computer.

You can also watch the video below:

 

2. Download and Install OpenJDK 11

OpenJDK 11 is the open source distribution of JDK 11, licensed under GNU General Public License version 2 (GPLv2).

To download OpenJDK 11, you have to go to OpenJDK Archive download page. Then scroll down a little bit to find the version 11.0.2. OpenJDK is distributed in only zip or tar.gz file. For Windows, download the zip file for Windows 64-bit, i.e. openjdk-11.0.2_windows-x64_bin.zip file.

Extract the downloaded zip file to a directory. Then type the following command to update JAVA_HOME (in Command Prompt with administrator right):

setx -m JAVA_HOME "g:\JDK\OpenJDK\jdk-11.0.2"

Then open another command prompt and type java –version, you will see:

open jdk version

That means you have successfully setup OpenJDK 11 on your computer.

You can also watch the video below:

 

Related Tutorials:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment

   


Comments 

#21Ahalya2024-02-18 12:11
i need it for OPEN stm32 system work bench
Quote
#20vaishnavi2024-01-23 00:36
as per the video showned am getting an error Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Quote
#19mohammad mia2024-01-14 19:38
I am satisfied.So i need to application.
Quote
#18yadav2023-11-30 11:12
for hacking what specilisation we have to do...
Quote
#17Mahfuj2022-06-29 00:30
This is good learning way
Quote