maven Perhaps you are running on a JRE rather than a JDK?

我就是我 2022-09-23 14:52 268阅读 0赞

使用eclipse对maven项目进行clean test的时候提示Maven-No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Center

问题描述:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

翻译过来就是,大哥,环境里没给编译器呀,可能你是用jre在玩耍,我要jdk~~

问题原因:eclipse官网看了看,发现eclipse默认是运行在jre上的,但是maven插件需要使用jdk,因此需要在eclipse修改Installed JRES
位置在—>【Window】—>【Prefrences】—>【Java】—>【Installed JREs】
详见下图。

Center 1

这样就解决了这个问题,重新构建一下

Center 2

发表评论

表情:
评论列表 (有 0 条评论,268人围观)

还没有评论,来说两句吧...

相关阅读