How to find the Path (Location) of JRE in Windows 10

  • “Start” > “Control Panel” > “Java”.
  • Select “Java” tab.
  • Click “View”
  • Look in the “Path” column for version of the JRE you have installed.
enter image description here
enter image description here

In the above example, the “Path” contains:

C:\apps\jdk\jre\bin\javaw.exe

JAVA_HOME should point to the root directory of the Java installation, so in this case:

C:\apps\jdk

And the PATH should contain JAVA_HOME\bin, in this case:

C:\apps\jdk\bin

From a command prompt we can set these values using the following commands:

setx JAVA_HOME C:\apps\jdk
setx PATH C:\apps\jdk\bin;%PATH%

Notes:

  • Modify the above commands as appropriate for your Java installation.
  • These are System not User environment variables.