【发布时间】:2011-07-06 23:43:35
【问题描述】:
每次我在 Eclipse 中更改 pom.xml 时都会收到错误消息。
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
我已经设置了 JAVA_HOME 环境变量。就是:JAVA_HOME=D:\Java\jdk1.6.0_23
谢谢。
【问题讨论】:
-
我有同样的问题,我无法通过这个答案来解决问题,你能看到stackoverflow.com/questions/12049566/…
标签: java eclipse maven m2eclipse