Below we use “17.0.x” to refer to some version of Java 17. The numbers might differ. Just download whatever the latest version is for Java 17.


  1. Go to https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html to download Java SE Development Kit 17.0.x for Windows. Find the Windows x64 msi Installer link and click to download. This might ask you to sign in with your Oracle account, if so, please do sign in.

  2. Open the jdk-17.0.x_windows-x64_bin.msi file.

  3. Then click Continue in the installer until the installation is completed.

  4. Next step is Adding Environment Variables https://en.wikipedia.org/wiki/Environment_variable. This allows the user to call Java from the command line.
    • Find the location of our JDK installation directory. The JDK is usually installed in the C:\Program Files\Java directory by default. Under this directory find the JDK 17 directory.
    • Copy the directory location from the File Explorer address bar.
  5. Set JAVA_HOME
    • Open File Explorer
    • Right-click on ‘This PC’ and select the Properties menu.
    • Click ‘Advanced system settings’ and the System Properties window will be shown.
    • Select the Advanced tab.
    • Click the Environment Variables button. A new Environment Variables window will be shown.
    • Under the System Variables, click the New button to create a new environment variable.
    • Enter the variable name as JAVA_HOME, all letters are in uppercase.
    • In the variable value enter the JDK installation path that you have copied .
    • Click OK.
  6. Set PATH
    • After setting the JAVA_HOME variable, now we can update the Path variable.
    • In the Environment Variables window, under the System Variables section find a variable named Path. If you do not have the Path variable you need to add one using the New button. If we already have the Path variable you will need to update its value, click Edit button to update.
    • If you have Windows 10, an Edit environment variable window will appear. Click the New button and add %JAVA_HOME%\bin (no ; needed). Click Move Up until your newly added value appears at the top of the list.
    • In old versions of Windows, an Edit System Variable window will appear where you’ll need to edit the value directly. Add %JAVA_HOME%\bin; (remember the ;) to the beginning of the Path variable value.
    • Click OK to close the window. Click OK again to close the Environment Variables window.
  7. Check to see if the settings work. Open your Windows Command Prompt. Type java -version in the command line. If everything was set correctly you will see the running version of your installed Java JDK. As an example on my Windows Command Prompt I have something like:
java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)