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

时间:2022-05-04
本文章向大家介绍No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

以前用MyEclipse,现在用eclipse配置maven后,运行run install.报错:

1 [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
2 [ERROR] -> [Help 1]
3 [ERROR] 
4 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
5 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
6 [ERROR] 

解决:

  1.   将设置中jre位置改成jdk。
  1.   右键maven项目,选择maven->update p....
  2. 重新run