您的位置:首页 > 编程语言 > Java开发

.[ERROR] Unable to locate the Javac Compiler in

2013-03-22 00:57 555 查看
When run maven project in Eclipse, you probably encounter the below error:

Unable to locate the Javac Compiler in:

C:\Program Files\Java\jre1.6.0_07\..\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.

The reason is that m2eclipse plugin want to find the tools.jar in JDK_HOME/lib folder. That
means you must install JDK to execute maven in Eclipse.

In Eclipse, you can configure the JRE included in JDK directory.



Then, configure JRE of maven Run Configuration as workspace default JRE.



OK. The problem is solved.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐