No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK

在eclipse中使用maven进行compile时,出现了“No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK”错误,从表面意思我们大概能看出,其实就是使用了JRE而不是JDK。 

修改一下Eclipse配置就好了,如下图:

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK_第1张图片

 

画红线的地方其实是我修改后,其实在你的这个窗口下,应该是JRE,我们应该把这个JRE给删除掉,然后添加你电脑上的JDK即可。

即,点击ADD->Standard VM->JRE home后面的Directory->选择你的JDK的目录

然后

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK_第2张图片

 

你可能感兴趣的:(Environment)