I have recently checked on my Java version. I ran the command java -version
and I found out that I was using java version 1.7.0_09
. But when I tried to
In answer to the "actual" question:
Another thing that is weird is, I tried to check on environment variable settings, and it does not say anything about jdk1.7.0_09.
What happened here is that you installed jdk1.7.0_07 and then you auto-upgraded it. When that happens , it still uses the old folder name that you originally installed to.
After I install Java , I usually make a copy of the JDK directory and name it with the version number. Then, I can directly call a certain java like so:
@echo off
:: testjava.bat
set JAVA_HOME=C:\JDK1.x.xx
set PATH=%JAVA_HOME%\bin;%PATH%;.
java -version
pause
So, my recommendation is to set your JAVA_HOME system variable and PATH variable like I show above. This would override everything on your system so that your JDK of your choice is the default over the JRE.