If you’re using any JDK which does not set a registry key, you need to manually set the
JAVA_HOME system variable. This mostly happens when using a
ZIP package installation of the JDK.
-
Locate your JDK installation (it’s most likely in a directory such as
C:\Program Files\jdk-11.x.x).
-
Search for Advanced system settings.
-
Select .
-
In the System variables section, click
New (or User variables for a
single user setting).
-
Add the following settings:
Variable name = JAVA_HOME
Variable value = path to the JDK installation (from step 1)
-
Click OK (twice) and finally click
Apply to save the changes.