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 View advanced system settings > Environment Variables.
- 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).
- Variable name =
-
Click OK (twice) and finally click Apply to save the changes.