Some Java applications require to define JAVA_HOME and Java path. Keep reading and I’ll explain how to do it in Windows 10.
How to set Java Home
You need to do the following to set JAVA_HOME:
Search for Advanced System Settings and launch it:
Go to Environment Variables:
Press “New” button in “System variables” section:
Type name “JAVA_HOME” and value – your path to Java, in my case, it’s C:\Program Files\Java\jre-9.0.4 and press “OK“.
How to set Java path
Find “Path” system variable and press “Edit“.
Press “New” and type “%JAVA_HOME%\bin” to add Java path.
Check if JAVA_HOME variable is defined
We set Java home and Java path variables, let’s check is it really working.
Open command prompt.
We can check Java home variable by typing “echo %JAVA_HOME%“.
We can verify the version of Java as well using “java -version” command.
If everything is OK your output like this: