title: SET JAVA_HOME in windows bat file not working
body: <p>why is <strong>SET JAVA_HOME</strong> in this bat file not overriding the environment variable JAVA_HOME?</p>
  
  <p><strong>someFile.bat</strong></p>
  
  <pre><code>@ECHO OFF
  SET JAVA_HOME = Progra~2\Java\jdk1.6.0_23
  echo JAVA_HOME: %JAVA_HOME%
  </code></pre>
  
  <hr>
  
  <p><strong>OUTPUT</strong></p>
  
  <pre><code>JAVA_HOME: C:\Program Files (x86)\Java\jdk1.7.0_21
  </code></pre>