finding location java_home in Windows 10
I need help finding the location of my java_home/bin, or if it even exists. If it doesn't, what more do I need to install?
I am following some installation directions, and one of the steps says:
Ensure that the Java Runtime Environment (JRE) is installed on the computer and that the java_home/bin directory is defined in the system path.
I can't even find the path of java_home. Disregarding the directions for other OS, this is the closest I've come to finding something helpful.
However, when I type the prescribed command, echo %java_home%
it just returns %java_home%
as a string, percent signs and all. When I try % java -version
down further in the page, it tells me %java isn't a recognized command, program, or batch file.
I have Java 8 Update 60 installed, I can see it in my list of programs I can uninstall. From the quote though, I have in mind that if I have a JRE installed, then java_home\bin exists. However, I've had File Explorer search very nearly the entire computer, and found nothing.
Solution 1:
I need help finding the location of my java_home/bin
"Start" > "Control Panel" > "Java".
-
Select "Java" tab.
Click "View"
-
Look in the "Path" column for version of the JRE you have installed.
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
notUser
environment variables.
See Installing the JDK Software and Setting JAVA_HOME and PATH and CLASSPATH for more information.