DropVPS Team
Writer: Cooper Reagan
how Setup java (jdk 17) on windows server 2022

Table of Contents
What you will read?
Once Java JDK 17 is installed on your Windows Server 2022, the next step is to configure the Java Environment Variables. Without this step, many applications and development tools may not detect Java properly.
Step 1: Open Environment Variables
Right-click on This PC (or My Computer) and select Properties or Navigate into the Windows Start Menu and search for ‘environment variable’ Select the result ‘Edit the system environment variables’:

This will open the System Properties dialog on your desktop. At the bottom of the dialog, click on the Environment Variables button.

In the System variables section, scroll down, locate the variable named Path, and select it. Then click on the Edit button.

Inside the edit dialog, click on New (or Browse) and add the Java bin directory path. For example:
C:\Program Files\Java\jdk-17.0.2\bin
Once the Java path has been added, click OK to save the changes and exit the environment variable editor.

Add the JAVA_HOME Variable
After configuring the Path variable, it’s best practice to define a JAVA_HOME variable. This makes it easier for other applications and services to detect your Java installation.
Go back to the Environment Variables dialog and, under the System variables section, click on New:

In the Variable name field, type:
JAVA_HOME
In the Variable value field, paste the path of your Java JDK directory (without the bin at the end). For example:
C:\Program Files\Java\jdk-17.0.2
Click OK to save the new variable. Then press OK again to close all dialogs.

That’s it! You’ve successfully configured Java JDK 17 on Windows Server 2022. Now your system can run Java commands globally, and other applications that depend on Java will work smoothly.