m2eclipse 指定想要使用jdk版本的问题

来源:互联网 发布:windows phone 8开发 编辑:程序博客网 时间:2024/05/17 08:25

构建maven项目时,命令行下构建成功,但是使用m2eclipse构建失败,提示如下

Unable to locate the Javac Compiler in:C:\Program Files\Java\jre1.6.0_07\..\lib\tools.jarPlease ensure you are using JDK 1.4 or above andnot a JRE (the com.sun.tools.javac.Main class is required).In most cases you can change the location of your Javainstallation by setting the JAVA_HOME environment variable.

理解上应该是jdk版本指定的问题,于是修改eclipse加载的jdk版本,发现已经修改为最新的jdk版本



貌似没有指定错误,为何eclipse会去找废弃的jre版本呢,于是将jre7的版本remove掉,一切恢复正常。

怀疑是多个jdk版本eclipse加载混乱的问题,于是又重性加入jre7的废弃版本,一切依然正常,不知道是什么原因导致的异常,留此求达人解释

原创粉丝点击