Tom*_*Tom 23 java eclipse m2eclipse maven
每次我在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
Run Code Online (Sandbox Code Playgroud)
我已经设置了JAVA_HOME环境变量.它是:JAVA_HOME = D:\ Java\jdk1.6.0_23
谢谢.
Syd*_*ney 55
这是我解决这个问题的步骤(Eclipse 3.7 Indigo):
窗口 - >首选项 - > Java - >安装JRE - >我从JDK位置有一个JRE,我的位置看起来像C:\Program Files\Java\jdk1.6.0_26
窗口 - >首选项 - > Java - >已安装的JRE - >执行环境 - >选择JavaSE-1.6并选择兼容的JDK,它应该是上一步中设置的JDK.
isu*_*nga 19
以上都不适用于我,但当我按照以下步骤操作时,问题就消失了.