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

2024-10-13 14:07:48

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 问题处理

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

maven install 执行时,No compiler 问题处理maven install 执行时,No compiler 问题处理
猜你喜欢