title: Java is Set to an Invalid Directory
body: <p>I am trying to set up maven, however when I tried <code>maven --version</code></p>
  
  <p>note I already viewed this question
  <a href="https://stackoverflow.com/questions/1184056/unable-to-install-maven-java-home-is-set-to-an-invalid-directory">Unable to install Maven on Windows: &quot;JAVA_HOME is set to an invalid directory&quot;</a></p>
  
  <p>I tried the solutions here but it still did not work.
  however still di not work</p>
  
  <p>here is the error</p>
  
  <pre><code>ERROR: JAVA_HOME is set to an invalid directory.
  JAVA_HOME = "C:\Program Files\Java\jdk1.6.0_24\bin\java.exe"
  Please set the JAVA_HOME variable in your environment to match th
  location of your Java installation
  </code></pre>