首页 新闻 搜索 专区 学院

使用maven创建ssm项目运行时出现下面问题

0
[已解决问题] 解决于 2020-10-14 16:40

[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: 2.369 s
[INFO] Finished at: 2020-10-13T15:15:15+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project SSMStudy01: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[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

yuer2020的主页 yuer2020 | 菜鸟二级 | 园豆:205
提问于:2020-10-13 15:24
< >
分享
最佳答案
0

maven项目启动需要jdk 而非JRE;你的开发工具没指定安装的jdk

奖励园豆:5
Ctrl` | 老鸟四级 |园豆:2714 | 2020-10-13 15:35

jdk有的呀

yuer2020 | 园豆:205 (菜鸟二级) | 2020-10-13 15:45
其他回答(3)
0

在此环境中不提供编译器。也许运行在JRE上,而不是JDK上

元亓 | 园豆:202 (菜鸟二级) | 2020-10-13 15:45
0

maven配置的问题,mavan在启动过程中用的是jdk而非jre,找到setting把上面的改为

yuer2020 | 园豆:205 (菜鸟二级) | 2020-10-13 16:22
0
ycyzharry | 园豆:22258 (高人七级) | 2020-10-13 21:59
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册