Unable to locate the Javac Compiler 解决办法
2016-11-22 15:01
363 查看
在使用eclipse对maven项目进行编译打包(Run As->Maven install)时,报以下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project jshop: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files (x86)\Java\jre7\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
右击该项目->Properties->Java Build Path,使用jre7变量:
jre7变量指向安装的jre路径如下:
这个路径是无法找到上面报错信息中提到的C:\Program Files (x86)\Java\jre7\..\lib\tools.jar,所以需要将该jre7变量指定的路径更新为C:\Program Files (x86)\Java\jdk1.7.0_60\jre(根据自己电脑上实际jdk下jre目录指定),即Window->Preferences->Java->Installed JREs:
点击“Apply”->“OK”按钮后,重新编译该项目成功。
相关文章推荐
- Unable to locate the Javac Compiler in: C:Program FilesJavajre6..libtools.jar解决办法
- Unable to locate the Javac Compiler 解决办法
- Unable to locate the Javac Compiler 解决办法
- Maven: Unable to locate the Javac Compiler 解决办法
- Maven install 时出现Unable to locate the Javac Compiler 解决办法
- Unable to locate the Javac Compiler in 错误的解决办法之一
- Ant Unable to find a javac compiler Perhaps JAVA_HOME does not point to the JDK 解决办法
- Maven出现 Unable to locate the Javac Compiler in解决方法
- Maven出现 Unable to locate the Javac Compiler in解决方法
- 解决mvn compile [INFO] Compilation failure Unable to locate the Javac Compiler in:
- 解决com.sun.tools.javac.Main is not on the classpath / Unable to find a javac compiler 的问题
- Maven报错: Unable to locate the Javac Compiler in: D:\Program\java\jre1.7.0_45\..\lib\tools.jar
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK解决
- Unable to find a javac compiler错误之解决办法
- Maven Unable to locate the Javac Compiler
- unable to find javac compiler;com.sun.tools.javac.Mainisnotontheclasspath的问题的解决
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK异常产生原因和解决方法。
- Unable to locate the Javac Compiler
- maven项目在运行jetty时:Unable to locate the Javac Compiler
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK异常产生原因和解决方法