title: "The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe"
body: <p>I am on JDK 8u25 on Windows 8, and I am experiencing a problem with my Java installation. I can run <code>javac</code> perfectly fine, but running <code>java</code> produces this error message:</p>
  
  <pre class="lang-none prettyprint-override"><code>The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe
  </code></pre>
  
  <p>How do I fix this?</p>
  
  <hr>
  
  <p>I think the problem has to do with my environment variables.</p>
  
  <p>The important variables, as I have set them, are:</p>
  
  <ul>
  <li><code>JAVA_HOME</code> – <code>C:\Program Files\Java\jdk1.8.0_25</code></li>
  <li><code>CLASSPATH</code> – <code>.;%JAVA_HOME%\lib</code></li>
  <li><code>PATH</code> – <code>&lt;other paths omitted&gt;;%JAVA_HOME%\bin</code></li>
  </ul>
  
  <p>And their expansions, as viewed with <code>set</code> in cmd, are:</p>
  
  <ul>
  <li><code>JAVA_HOME</code> – <code>C:\Program Files\Java\jdk1.8.0_25</code></li>
  <li><code>CLASSPATH</code> – <code>.;C:\Program Files\Java\jdk1.8.0_25\lib;%CLASSPATH%;</code></li>
  <li><code>PATH</code> – <code>C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk1.6.0_45\bin;&lt;other paths omitted&gt;;C:\Program Files\Java\jdk1.8.0_25\bin</code></li>
  </ul>
  
  <p>The full output of <code>set</code> can be viewed <a href="https://i.stack.imgur.com/Zjrrg.png" rel="noreferrer">here</a>.</p>