maven install 执行时,No compiler 问题处理

2025-04-17 20:38:13

1、在 Eclipse 中,对一个工程执行 Maven install 操作,报了如下蕾蓄允嘞错误:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?从错误信息上看,貌似是我们的Eclipse配置了JRE,而不是要求的JDK。

maven install 执行时,No compiler 问题处理
maven install 执行时,No compiler 问题处理

2、打开 "Window-->Preferences-->Installed JREs" 菜单项,确认我们这里确实配置并使用 JRE!点击右侧 “Add”按钮,添加并配置 JDK,并且记得删除原始的那个 JRE 项,并点击下方的 “Apply”按钮进行确认。

maven install 执行时,No compiler 问题处理
maven install 执行时,No compiler 问题处理
maven install 执行时,No compiler 问题处理

3、再次执行 Maven Install 命令,这次就能指行成功了!

maven install 执行时,No compiler 问题处理
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢