title: Maven in Eclipse complains that "Unable to locate the Javac Compiler" whenever POM changed
body: <p>I got error message every time  I changed my pom.xml in eclipse.</p>
  
  <pre><code>Build errors for myapp; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project web: Compilation failure
  Unable to locate the Javac Compiler in:
    C:\Program Files (x86)\Java\jre6\..\lib\tools.jar
  Please ensure you are using JDK 1.4 or above and
  not a JRE (the com.sun.tools.javac.Main class is required).
  In most cases you can change the location of your Java
  installation by setting the JAVA_HOME environment variable
  </code></pre>
  
  <p>I have set JAVA_HOME environment variable. It is:JAVA_HOME=D:\Java\jdk1.6.0_23</p>
  
  <p>Thanks.</p>