How to Install Java JDK 23 on Windows 11 (with JAVA_HOME)

Java JDK 23 is the latest version available and is essential if you’re working on Java applications or learning Java programming. In this guide, you’ll learn how to download, install, and set up Java JDK 23 on Windows 11. We also configure the JAVA_HOME environment variable. Let’s dive right in!

YouTube Video: How to Install Java JDK 23 on Windows 11 (with JAVA_HOME)

We recommend watching below the step-by-step video to install and setup Java JDK 23 on Windows 11:

Why Do You Need Java JDK 23?

Java JDK (Java Development Kit) contains all the tools to compile and run Java programs. The latest version, JDK 23, comes with new features and performance improvements, making it an excellent choice for developers.

How to Install Java JDK 23

Step 1: Download Java JDK 23

  1. Open your web browser and go to the Oracle official website.
  2. Navigate to the Java SE Downloads section.
  3. Look for Java JDK 23 and choose the Windows x64 Installer.
  4. Click the Download button and accept the license agreement if prompted.
Direct link to Download Java 23. Screenshot is attached for your reference,
How to Install Java JDK 23 on Windows 11 (with JAVA_HOME)


Step 2: Install Java JDK 23

  1. After downloading the installer, double-click on it to start the installation.
  2. Follow these simple steps:
    • Click Next on the welcome screen.
    • Choose an installation folder or keep the default one (recommended).
    • Click Next and then Install.
  3. Wait for the installation to finish and click Close when done.

Step 3: Verify the Installation

  1. Open the Command Prompt (type cmd in the Start menu).
  2. Type the command:
    java -version
    
  3. Press Enter, and you should see details about Java JDK 23 if the installation was successful.

How to Set Up JAVA_HOME

Setting up the JAVA_HOME environment variable is important for many Java-based applications and tools.

Step 1: Locate the JDK Installation Path

  1. Go to the folder where Java JDK 23 is installed.
    (Default path: C:\Program Files\Java\jdk-23)
  2. Copy the full path to this folder.

Step 2: Set the JAVA_HOME Variable

  1. Open the Start menu and search for Environment Variables.
  2. Click on Edit the system environment variables.
  3. In the System Properties window, click on the Environment Variables button.
  4. Under System Variables, click New.
  5. In the Variable Name field, type:
    JAVA_HOME
    
  6. In the Variable Value field, paste the JDK path you copied earlier.
  7. Click OK to save.

Step 3: Update the Path Variable

  1. In the same Environment Variables window, find the Path variable under System Variables.
  2. Select it and click Edit.
  3. Click New and add:
    %JAVA_HOME%\bin
    
  4. Click OK to save your changes.

Step 4: Test the Configuration

  1. Open the Command Prompt again.
  2. Type the command:
    echo %JAVA_HOME%
    
  3. Press Enter, and the JDK installation path should be displayed.
  4. Finally, type javac to check if the Java compiler is working.

You’re all set! Java JDK 23 is now installed on your Windows 11 system, and the JAVA_HOME environment variable is configured. You can start building Java applications or run tools that require Java.

Comments