Maven: Unable to locate the Javac Compiler 解决办法
2015-09-05 16:09
495 查看
转载自: /article/10422967.html
在使用eclipse 运行 maven install的时候,出现这个错误:
[ERROR] Unable to locate the Javac Compiler in:
D:\Program Files\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.
解决方法:
window–>preferences–>java–>Installed JREs:将路径设置成jre的路径
重启eclipse
我出现这问题的原因是Eclipse是从别处copy出来,而我的JDK安装目录跟别处的不一样,导致无法找到JDK的安装目录。
在使用eclipse 运行 maven install的时候,出现这个错误:
[ERROR] Unable to locate the Javac Compiler in:
D:\Program Files\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.
解决方法:
window–>preferences–>java–>Installed JREs:将路径设置成jre的路径
重启eclipse
我出现这问题的原因是Eclipse是从别处copy出来,而我的JDK安装目录跟别处的不一样,导致无法找到JDK的安装目录。
相关文章推荐
- java静态方法
- 分布式定时任务框架比较,spring batch, tbschedule jobserver
- quartz集群分布式(并发)部署解决方案-Spring - 推酷
- JavaWeb学习篇之----Session&&Cookie
- java之路——输出HelloWorld
- replace与replaceAll的区别
- java 练习
- Struts2 part 7:文件上传
- java.sql.Blob类型如何插入到MySQL数据库
- 类、对象、继承、封装、多态、方法的重载和重写、Java的访问修饰符与其它关键字
- java语言发展史
- Eclipse快捷键
- Eclipse快捷键
- Spring学习之Aop的基本概念
- JAVA 二叉树遍历
- 杭电ACM2055java做法
- JavaFX8开发过程中的问题记录
- javacript 框架设计1
- Java I/O输入输出流详解
- java文件的远程传输