Skip to content
Follow
Windows

How to Install Oracle Java JDK on Windows 11

Richard
Written by
Richard
Dec 16, 2021 Updated Sep 15, 2026 2 min read
How to Enable or Disable Phone Link in Windows 11
How to Enable or Disable Phone Link in Windows 11

Oracle Java Development Kit (JDK) is a software package that gives you the tools you need to write and run Java apps on Windows 11. Installing Oracle JDK 21, the current long-term support release, sets up the compiler and command-line tools required for your programming projects.

Advertisement
⚡ Quick Answer

Download the JDK installer from Oracle’s website and run it. Follow the on-screen prompts, accepting default settings. After installation, edit system environment variables to set JAVA_HOME and add the JDK’s bin directory to the Path.

Advertisement

Prerequisites

Before you begin, ensure you have the following:

  • Administrative Rights: You must have an administrator account on your Windows 11 PC to install software and modify system environment variables.
  • Storage Space: Ensure you have at least 500MB of free disk space.
  • Internet Connection: Required to download the JDK installer.

Oracle JDK vs. OpenJDK: Which Should You Choose?

When installing Java JDK on Windows 11, you’ll encounter two primary options: Oracle JDK and OpenJDK.

Downloading and Installing Java

Installing Java JDK on Windows 11 starts by downloading the correct installer from the official Oracle website and running the setup wizard. You need administrator permissions to complete this setup. Follow the standard on-screen prompts and keep the default installation path to avoid future configuration problems.

Oracle Java JDK installer download page on the official website
download java installer

When the installation completes, click ‘Close’.

Java installation wizard prompt on Windows 11 showing Next button
windows 11 java installer next

Java will install to C:\Program Files\Java\jdk-version-number. Click ‘Close’ when the installation finishes.

Advertisement
Java installation complete window confirming successful JDK setup on Windows 11
windows 11 java installation complete

Configuring Environment Variables

Setting up the JAVA_HOME environment variable tells Windows 11 and your coding tools where to find your Java installation. You add this variable through the system settings by creating a new system variable, naming it JAVA_HOME, and pasting the exact folder path of your Java folder.

File explorer showing the installed Java JDK folder path on Windows
java home folder windows 11

Click the "Environment Variables" button at the bottom. Under "System variables," click "New."

Windows 11 system properties window for editing environment variables
windows 11 advanced environment variables
New system variable dialog box for setting JAVA_HOME on Windows
java environment home variable
⚠️WarningEnter 'JAVA_HOME' as the variable name and your installation path (e.g., 'C:\Program Files\Java\jdk-17') as the value.
Configuring the JAVA_HOME variable value with the Java installation path
windows 11 java home folder variable
⚠️WarningLocate the "Path" environment variable in the system's list of variables and select "Edit." Click the "New" button to add a new entry.

Input the full directory path to the Oracle Java Development Kit (JDK) installation, for example, C:\Program Files\Java\jdk-17. This step ensures Windows 11 can find the Java tools.

Advertisement
%JAVA_HOME%\bin
Editing the system Path variable to include Java JDK tools
path variable in windows 11 java

Verifying the Installation

Open Command Prompt or PowerShell and type these commands:

java -version

javac -version

Troubleshooting Installation

Fixing a java -version command that does not work on Windows 11 usually requires checking your file paths and restarting your Command Prompt. If your computer still cannot find Java, verify that you typed the path correctly and closed all open command windows to load the new settings.

  • Path Typos: Ensure your JAVA_HOME path matches your actual installation folder exactly.
  • Restart Terminal: Always close and reopen your Command Prompt after changing environment variables so the system can refresh the settings.
  • Permissions: Ensure you ran the installer as an administrator.

Summary

To install Java JDK on Windows 11, you'll download the installer, run it as an administrator, and set up your JAVA_HOME and Path environment variables.

```

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

📚 Related Tutorials

How to Free Up Disk Space with OneDrive in Windows 11
Windows How to Free Up Disk Space with OneDrive in Windows 11
How to Enable or Disable Windows Ready Print in Windows 11
Windows How to Enable or Disable Windows Ready Print in Windows 11
Advanced Windows 11 Guide For Developers
Windows Advanced Windows 11 Guide For Developers
How to Refresh Wi-Fi Networks in Windows 11
Windows How to Refresh Wi-Fi Networks in Windows 11

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *