首页 > 其他 > 详细

深圳风采几点开奖查询:解决Perhaps you are running on a JRE rather than a JDK?问题

时间:2015-04-15 13:34:35      阅读:128519      评论:0      收藏:0      [点我收藏+]

深圳风采开奖直播 www.nskjr.cn 标签:jdk   eclipse   maven   a jre rather than a   插件   

Maven-No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

技术分享


[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld ---
[INFO] Deleting H:\mavenok\helloworld\target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using ‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory H:\mavenok\helloworld\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to H:\mavenok\helloworld\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.781 s
[INFO] Finished at: 2015-03-25T11:22:14+08:00
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project helloworld: 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] //cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


问题描述:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

翻译过来就是,大哥,环境里没给编译器呀,可能你是用jre在玩耍,我要jdk~~


问题原因:eclipse官网看了看,发现eclipse默认是运行在jre上的,
但是maven插件需要使用jdk,因此需要在eclipse修改Installed JRES
位置在-->【Window】-->【Prefrences】-->【Java】-->【Installed JREs】
详见下图。


技术分享


这样就解决了这个问题,重新构建一下


[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloworld ---
[INFO] Deleting H:\mavenok\helloworld\target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using ‘UTF-8‘ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory H:\mavenok\helloworld\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to H:\mavenok\helloworld\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.117 s
[INFO] Finished at: 2015-03-25T11:45:51+08:00
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------


构建成功。

技术分享








解决Perhaps you are running on a JRE rather than a JDK?问题

标签:jdk   eclipse   maven   a jre rather than a   插件   

原文://blog.csdn.net/yangtzh/article/details/45057273

(14)
(43)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
? 2014 深圳风采开奖直播 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号

  • 清华同衡规划设计院副院长、景观中心主任胡洁精彩发言 2019-03-22
  • 湖州南浔:“文体惠民”送进村 2019-03-22
  • 世界献血日:走近无名英雄“熊猫侠” 2019-03-21
  • iPad也陷降速门?苹果已引发17起集体诉讼 2019-03-20
  • 它从未改变 人民网试驾广汽本田第十代雅阁 2019-03-20
  • 世界杯夜不眠 合肥万达乐园打造霸都球迷首选集结地 2019-03-19
  • 走近土掌房文章中国国家地理网 2019-03-18
  • 北京:走进高考阅卷现场 2019-03-17
  • 火车南站能多设置几个停车和上下车提示牌吗? 2019-03-17
  • 浙江消防志愿者小区“巡防” 携手居民共建“安全网” 2019-03-16
  • 对话川美前院长罗中立:揭秘《父亲》创作历程 2019-03-15
  • “长城新媒体”官方微信、微博 2019-03-14
  • 不怕玩阴的就怕来真的,小金的真威震四方,他那核弹是真敢甩啊,老特都惧 2019-03-14
  • 人民体育《大咖说》:破风骑行董事长董超谈自行车运动现状 2019-03-13
  • 百度地图春运出行大数据:年轻人返乡晚离家早 上班到最后一天 2019-03-13
  • 638| 272| 691| 99| 324| 930| 356| 842| 489| 664|