No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题
2015-06-29 09:24
836 查看
maven编译项目时出错,提示信息如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project springside-core: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
解决方案:
下载java jdk,并安装java jdk。下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
在eclipse的菜单中,进入 Window > Preferences > Java > Installed JREs > Execution Environments,选择JavaSE-1.6, 在右侧选择jdk.
然后在maven菜单中使用 “update project ...”.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project springside-core: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
解决方案:
下载java jdk,并安装java jdk。下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
在eclipse的菜单中,进入 Window > Preferences > Java > Installed JREs > Execution Environments,选择JavaSE-1.6, 在右侧选择jdk.
然后在maven菜单中使用 “update project ...”.
相关文章推荐
- ACM程序设计大赛-------- 最少钱币数(Java代码)
- Java清理临时目录文件Demo(一)
- 【Spring学习笔记-MVC-12】Spring MVC视图解析器之ResourceBundleViewResolver
- 《Java课程实习》日志(周一)
- 实习日志1---MyEclipse与MySql的链接,数据库的创建
- 详细记录一下JAVA应用程序服务出现内存溢出的利用MAT分析过程
- 介绍几个java把网页报存为图片的框架
- struts2中非表单标签的使用 componen
- java集合类之------Properties
- 开源 java CMS - FreeCMS2.3会员头像设置
- java中的Timer和TimerTask
- Java String is "immutable"
- 《编程导论(Java)·11.1(排序)说明》
- 关于 Java 性能监控您不知道的 5 件事,第 1 部分
- 在 Java SE 6 中监视和诊断性能问题
- Java SE 6 新特性: JMX 与系统管理
- Java基础学习笔记。
- Java SE 6 新特性: Instrumentation 新功能
- Java SE 6 新特性: Java DB 和 JDBC 4.0
- Java SE 6 新特性: 对脚本语言的支持