Skip to main content

Windows

Using the Official Oracle Installer

  1. Visit the Oracle Java Downloads page
  2. Download the Windows installer (.exe or .msi) for Java 17
  3. Run the downloaded installer and follow the installation wizard
  4. Verify the installation by opening Command Prompt and running:
java -version

Using OpenJDK

  1. Visit Adoptium (formerly AdoptOpenJDK)
  2. Download the Windows installer for OpenJDK 17
  3. Run the installer and follow the installation wizard
  4. Verify the installation by opening Command Prompt and running:
java -version

Using Chocolatey Package Manager

If you have Chocolatey installed:

choco install openjdk17
java -version

Setting JAVA_HOME

  1. Right-click on This PC or My Computer and select Properties
  2. Click on Advanced system settings
  3. Click the Environment Variables button
  4. Under System variables, click New
  5. Enter JAVA_HOME as the variable name
  6. Enter the path to your Java installation (e.g., C:\Program Files\Java\jdk-17) as the variable value
  7. Click OK to close all dialogs
  8. Verify by opening a new Command Prompt and running:
echo %JAVA_HOME%