How to Download and Install Java JDK on Windows 11

Java remains one of the most in-demand programming languages in the IT industry. Whether you’re starting your journey as a Java developer or running Java-based applications, you’ll need to install and configure the Java Development Kit (JDK) on your Windows system.

As of now, Java JDK 22 is the latest release of the Java SE Development Kit. You can easily download it from the official Oracle website. However, simply installing Java isn’t enough — you’ll also need to set up environment variables so your system can recognize Java commands globally. Don’t worry, this guide covers everything step-by-step.

Why You Need Java JDK on Windows 11

Before diving into the installation, it’s important to note that Java JDK isn’t just for developers. Many desktop and web applications depend on Java to run properly. Installing the JDK ensures that your system has the necessary tools to compile and execute Java programs without errors.

Step 1: Download the Java JDK Installer

To get started, you’ll first need to download the Java SE Development Kit installer.

  1. Open any browser and go to the official Java Downloads page.
  2. Choose the latest version of Java (e.g., JDK 22) and select Windows as your operating system.
  3. Download the x64 Installer file.

Tip: Always download Java from the official Oracle or OpenJDK site to ensure security and compatibility.

Step 2: Install Java JDK on Windows 11

Once the download is complete, you can proceed with the installation. The process is simple and straightforward.

  1. Locate and open the downloaded installer file.
  2. In the Java SE Development Kit Setup window, click Next.
  3. Choose your preferred installation location (or leave it as default at C:\Program Files\Java).
  4. Click Next again to continue.
  5. Wait for the installation to complete.
  6. Once done, click Close to finish the setup.

You’ve now installed Java JDK on your Windows 11 system.

Step 3: Set Up Java Environment Variables on Windows 11

Installing Java isn’t enough — you must also configure the environment variables so Windows can locate Java from any command line or IDE.

Follow these steps:

  1. Go to the folder where Java is installed — by default, it’s located at:
    C:\Program Files\Java\
  2. Open the JDK folder, then open the bin folder.
  3. Copy the full path of the bin folder (e.g., C:\Program Files\Java\jdk-22\bin).
  4. Press Win + I to open Settings and go to System → About.
  5. Click Advanced system settings on the right side.
  6. In the System Properties window, click Environment Variables.
  7. Under System variables, select Path and click Edit.
  8. Click New, then paste the copied bin path.
  9. Click OK to save your changes.

You’ve successfully added Java to your system’s PATH variable.

Step 4: Verify Java Installation

Now it’s time to verify that Java has been installed and configured correctly.

  1. Press Win + S, type CMD, and open Command Prompt.
  2. To check your Java version, type the following command and press Enter: java --version This should display the installed version of Java.
  3. To verify that the Java compiler is working, run: javac If you see a list of compiler options or a set of statements, Java has been successfully configured.

Conclusion

That’s it! You’ve successfully installed and set up Java JDK on Windows 11. You can now start coding in Java or run Java-based applications without any issues.

If you encounter a JAVA_HOME error during development, check out our guide on how to set the JAVA_HOME variable on Windows 11 to fix it quickly.

With Java ready on your PC, you’re all set to start building powerful applications, running Java programs, or setting up your favorite IDE like Visual Studio Code or IntelliJ IDEA.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.