title: java -version and javac -version showing different versions
body: <p>I have <code>java 7</code> and <code>java 8</code> both installed on my windows system under <code>C:\Program Files\Java</code></p>
  
  <p>In the environment's path I specified the path of <code>java 7</code> like this.</p>
  
  <p><code>%JAVA_HOME%/bin</code> where <code>JAVA_HOME = C:\Program Files\Java\jdk1.7.0_17</code></p>
  
  <p>But when I type <code>javac -version</code> it shows <code>javac 1.7.0_17</code> which makes sense </p>
  
  <p>but when I do  <code>java -version</code> it shows </p>
  
  <pre><code>java version "1.8.0"
  Java(TM) SE Runtime Environment (build 1.8.0-b132)
  Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/jbTFl.jpg" alt="enter image description here"></p>
  
  <p><strong>Any idea what may be the problem here?</strong></p>
  
  <p><strong>Edit</strong> The installed folder :
  <img src="https://i.stack.imgur.com/XaVdG.jpg" alt="enter image description here"></p>
  
  <p><strong>And one more thing <code>echo %PATH%</code> has only one occurence of <code>JDK</code> that is for <code>java 7</code> and no occurence for <code>JRE</code> found in it.</strong></p>