maven编译项目提示No compiler is provided in this environment. Perhaps you are running on a JRE rather than

使用maven编译项目提示

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


解决方法:

  1. 在eclipse的菜单中,进入 Window > Preferences > Java > Installed JREs > add>standard VM>next,jre HOME直接选择jdk(不要选择安装有jdk跟jre的目录,而是直接选择jdk目录)

  2. maven编译项目提示No compiler is provided in this environment. Perhaps you are running on a JRE rather than_第1张图片

  3. 然后在maven菜单中使用 “update project ...”.

  4. 如果还不可以

  5. 在eclipse的菜单中,进入 Window > Preferences > Java > Installed JREs > Execution Environments,选择JavaSE-1.8(选哪个是看你的jdk版本), 在右侧选择jdk.

  6. 然后在maven菜单中使用 “update project ...”.


你可能感兴趣的:(java技术)