I have installed java 1.7 and updated java_home to points java 1.7 but if I check it from windows cmd c://user//somefolder
and type java -version it shows old one not 1.7
Asked
Active
Viewed 922 times
0

user3543851
- 166
- 3
- 10
-
1Check the environmental variable PATH in your system. – Rahul Jun 18 '14 at 12:54
-
Update `%PATH%` or `%JAVA_HOME%`, wherever appropriate. – Unihedron Jun 18 '14 at 12:55
-
Did you install Java 1.7 using the actual installer or by just downloading and unzipping the ZIP version? – Omaha Jun 18 '14 at 12:56
2 Answers
4
Check your JAVA_HOME
and PATH
environment variables, are they correct?
(go in cmd
and type set
to see...)
PS. restart your windows command prompt if you had it open from before you updated to 1.7

vikingsteve
- 38,481
- 23
- 112
- 156
1
You are checking JAVA_HOME
, but when you execute java.exe -version, the java.exe file is looked up in PATH
variable. Most of the times PATH
contains something like %JAVA_HOME%\bin
, but in your case it might just point explicitly to the old JDK like C:\Program Files\Java\jdk1.6.0
- Make sure that
JAVA_HOME
points to, say,C:\Program Files\Java\jdk1.7.0
- Make sure that
PATH
begins with%JAVA_HOME%\bin