Maven Install报错:Perhaps you are running on a JRE rather than a JDK?

原文连接:https://www.jianshu.com/p/1ed0ec397575

所遇问题:

【springboot】springboot 错误集合

 

英文描述:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project busiservice: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

中文描述:此环境中未提供编译器,你可能使用jre运行而不是jdk。
引发原因:Eclipse默认在jre上运行,maven install 编译需要jdk中的编译器,而jre中并没有
问题解决:

【springboot】springboot 错误集合

Window->Preferences

 

【springboot】springboot 错误集合

Java->Installed Rres->Add

 

【springboot】springboot 错误集合

Directory...

 

【springboot】springboot 错误集合

jdk->ok

 

【springboot】springboot 错误集合

Java->Installed JREs->Execution Environments->JavaSE-1.7->jdk1.x

 

【springboot】springboot 错误集合

Java->Installed JREs->Execution Environments->JavaSE-1.8->jdk1.x

 

【springboot】springboot 错误集合

maven->install(编译成功)



作者:_向太阳_
链接:https://www.jianshu.com/p/1ed0ec397575
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

相关文章: