Reputation: 639
I am using windows 8, and have tried to set JAVA_HOME as
C:\Program Files\Java\jdk1.8.0_05
And PATH as
%JAVA_HOME%\bin
When I reopen the console, PATH still gives me:
PATH = C:\Program Files .....; C:\Program Files\Java\jdk1.8.0_05\bin
When I do cd %JAVA_HOME%
, it guides me to the java directory:
C:\Program Files\Java\jdk1.8.0_05
but when I open another new console and type java -version
javac
or 'jar', it reports error of "java/javac/jar" is not recognized as an internal or external command operable program or batch file....
So are there anything else that I didn't do? Isn't PATH clear enough to give the path to find "java"?
THanks!
Upvotes: 0
Views: 800
Reputation: 116
Try setting the PATH
and JAVA_HOME
system environment variables.
See this.
Upvotes: -1
Reputation: 607
The bin dir of your JAVA_HOME directory needs to be on your path. Try
echo %PATH%
to confirm whether or not this is the case.
Upvotes: 2