Site icon TestingDocs.com

Install Java on Windows 11

Overview

In this tutorial, we will learn the steps involved to Install Java on Windows 11 operating system. Windows 11 is the latest operating system from Microsoft Corporation.

Check Install

First things first, check if Java is installed on the Windows 11 machine. Open command prompt and issue the following command:

\> java -version 

If you see a java version in the command output, then Java is already installed on the machine.

 

If the command output is:

‘java’ is not recognized as an internal or external command, operable program or batch file.

Proceed further to download and install Java \ JDK.

 

Download Java Installer

We have two options here

First option is a no-install ZIP archive bundle package. We can download the package and just extract the archive file contents to a directory. Copy this directory to a suitable location on the computer.

Set environment variables. That’s it.

 

Second option, we can download the JDK installer. ( either .exe file or .msi installer file). The installer takes care of some install options for you.

jdk-<version>_windows-x64_bin.exe 

 

The file would be downloaded on to the Windows 11 computer, usually to the Downloads folder.

Run Java Installer

Locate the JDK installer and double click on the .exe file to run it.

Windows 11 UAC Prompt

We need to have Administrator privileges to install the application. Click on the Yes button in the UAC prompt. Verify the Publisher Information on the UAC prompt dialog. On production systems, we may need to additionally check the integrity of the JDK download.

Installation is simple. Run through the install wizard screens by clicking  on the Next > buttons. In most cases, we can accept the defaults.

However, if we want to customize the install destination folder, we can change in the Destination Folder screen. To change the folder click on the Change… button. Choose a folder to install JDK.

Make a note of this directory. We need to set the environment variable JAVA_HOME that point to this install folder.

 

Set System Variables

Click on the Search icon in the Taskbar.

Search for environment variables in the Search bar. Click the Edit the system environment variables  link.

Set JAVA_HOME variable

Click on the Environment Variables… button in the System Properties window.

Click on the New… button.

 

Type JAVA_HOME in Variable name: text box.

The Java destination folder in the Variable value: text box. We can browse the Java folder using the Browse Directory… button.

Once done, click on the OK button.

 

Append Java bin folder to PATH

Now, in the System variables choose the Path system environment variable and click on Edit… button.

Click on New button and add the following entry

%JAVA_HOME%\bin

Click on OK button and close the System properties window.

Verify Install

Launch a new command prompt and issue the following command to check the JDK installation.

\> java -version

This command should display the Java version to the command window.

That’s it. We have successfully installed Java on Windows 11 machine.

Windows 11 Tutorials

https://www.testingdocs.com/windows-11-tutorials/

More Information on Windows 11

https://www.microsoft.com/en-us/windows

Exit mobile version