This publication shows students and new users the steps to install the Oracle Java JDK on Windows 11. For anyone creating Java-based applications, you will be using the Java programming language. The Java language is popular and is in almost all operating systems.

To create and use Java applications on Windows 11, you will need to install the Java JDK. The JDK includes tools for developing and testing programs written in the Java programming language and running on the Java platform.

Here are the steps you can take to download, install, and add Java executables to Windows PATH environment variables.

How to download and install Java JDK on Windows 11

As mentioned above, to build a Java program development on Windows, you will need to have the Java JDK installed. The steps below show you how.

First, go and download the Java JDK package from the link below.

Oracle Java Downloads

On the download page, choose the Java JDK Windows Installer (.EXE) and download it.

download java installer

Once downloaded, go to your Downloads folder and run the JAVA executable (jdk-17_windows-x64_bin).

Double-clicking on the installer should launch the Windows installer to install Java. When prompted, click next continue.

windows 11 java installer

Accept the default installation option, including the path. By default, Java is installed on the C: Java program files jdk-version-number.

At the end of the installation, click Near.

windows 11 java installation complete

Java is installed correctly. Now follow the next step to set environment variables for Java.

As you can see, the Java home folder is at C: Java Program Files jdk-17.0.1. This is not a standard execution path in Windows. You will have to add JAVA HOME to the PATH environment variable in order to use Java effectively.

java windows 11 home folder

How to add Java to PATH environment variables in Windows 11

By default, most programs will add their own custom shortcuts to Windows PATH environment variables.

Some programs will not automatically add to the system path variables, but will allow users to edit or add to the path so that the program can function properly.

Everything about Windows PATH environment variables can be found at the following link:

How to add or edit Windows PATH environment variables in Windows 11

To add add JAVA to the PATH environment, open Environment Variables from the System Properties ==> Advanced tab.

windows 11 advanced environment variables

In the Environment Variables properties window, under System Variables, click the New button.

Java environment startup variable

Writes JAVA_HOME in Variable name field and type the path where Java is located in the Variable value country. Then click okay.

Windows 11 Java home folder variable

Then select the Path variable under System Variable and click Edit. Make sure a variable path for Java is included as highlighted in the image below.

If not, you may need to add a new variable for Java. Typically, you will create a new variable with the following value:

%JAVA_HOME%/bin
path variable in Windows 11 Java

After all the steps above, open the command prompt console, then type the commands below:

java -version
javac -version

You should get lines similar to the following:

java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

You should do that!

Conclusion:

This post shows you how to install and configure JAVA on Windows 11. If you find any errors above or have something to add, use the comment form below.

Write A Comment