eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather...

右键 pom.xml -> Run as -> Maven install 后出现类似如下错误:

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第1张图片

 

解决方法:

1)选择项目后,点击 eclipse 导航栏中 【Window】-->【Prefrences】-->【Java】-->【Installed JREs】-->Add

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第2张图片

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第3张图片

选择【Standard VM】---> 【Next > 】选择JDK的安装目录确定。

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第4张图片

 出现如下页面后,点击【Directory ...】选择jdk的安装目录 -->【Finish】

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第5张图片

最后勾选上 jdk -- > 【OK】

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第6张图片

 

2)选择项目后,点击 eclipse 导航栏中 【Project】-->【Properties】-->【Java Build Path】-->【Libraries】

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第7张图片

 出现如下界面后,双击JRE System Libraries ,选择jdk

 eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第8张图片

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第9张图片

 

 此时再次执行 Maven install,即可打包成功

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather..._第10张图片

 

转载于:https://www.cnblogs.com/yaner2018/p/10186800.html

你可能感兴趣的:(eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather...)