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

2020-10-14 15:58发布

[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

标签:
4条回答
看我几分像从前
3楼-- · 2020-10-14 16:47

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

查看更多
Lonely孤独者°
4楼-- · 2020-10-14 16:52

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

查看更多
一夜七次
5楼-- · 2020-10-14 16:57

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

查看更多
登录 后发表回答