title: how can we change java version to use
body: <p>I have multiple java versions installed in my machine(os Windows 8). I have java 1.6, 1.7 &amp; 1.8 installed in my machine. I have set the path environment variables only for version 1.6 as Java_Home &amp; for 1.8 as Java_Home8.  </p>
  
  <p>But strangely when i type java -version in command prompt, and it refers to jdk 1.7 version. But strangetly, I looked at path environment variables, and I couldn't find path that leads to jdk 1.7 installation folder.I have not created any seperate path variables for jdk 7. I have also not included it in path as well. But still when i open the command prompt and type java -version, it still points to java 7.   Below are the contents of the path variable</p>
  
  <pre><code>%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jre1.8.0_60\bin;C:\Program Files\Java\jre1.6.0_07\bin;%M2%;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_07\bin;C:\Program Files\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;
  </code></pre>
  
  <p>Can someone explain how this happens. My assumption is that when i execute the java -version command, it refers to the version provided in the path variables. But it does not happen that way. Can you please explain the reason for the same and how it picks/displays the java 7 version. </p>