`
hezhiyu
  • 浏览: 60871 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

运行maven命令的时候出现jre不正确的error

阅读更多
运行maven命令的时候出现如下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.

google了一下解决办法如下:
What I discovered is that the JRE set from Eclipse was pointing to the "Program Files\Java\Jre...", the one without jdk.The solution was to change the JRE to the "...SDK\jdk\jre..." the one contained in the JDK installation.

Everything works fine now

大体说的是eclipse指向的是安装的jre,而不是jdk下的jre,解决办法就是设置jre为jdk下的jre,问题就解决了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics