It looks like you have not added the correct directory to your path.
First, find the directory in which you installed Java. For example, on my mailbox this is in C:\Program Files\java\jdk1.7.0_11 1 . Once you find it, try running it directly. For example:
c:\> "c:\Program Files\java\jdk1.7.0_11\bin\java" -version
Once you definitely get the version you need, add the bin directory to the PATH environment variable.
Note that you do not need the JAVA_HOME environment variable and it does not take some time. Some tools can use it - and if you use one of them, be sure to install it, but if you just use (say) Eclipse and java / javac command line tools, you are fine without it.
1 Yes, it reminded me that I need to update ...
Jon Skeet Apr 3 '13 at 20:00 2013-04-03 20:00
source share