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

Posted 漫步CODE人生

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?相关的知识,希望对你有一定的参考价值。


(1)需要设置JDK
Windows -> Perferences -> Java -> Installed JRES
加入JDK 如:D:\Program Files\Java\jdk1.8.0_92
Maven update
Maven clean
project clean
build project eclipse::eclipse


(2)环境的问题。
在maven下conf文件夹里的setting中的加入:
<profile>
<id>jdk18</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>

以上是关于No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的主要内容,如果未能解决你的问题,请参考以下文章

关于Maven项目build时出现No compiler is provided in this environment的处理

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

Maven项目 报错No compiler is provided in this environment. Perhaps you are running on a JRE rather than

mavenmaven的web项目打包报错:No compiler is provided in this environment. Perhaps you are running on a JRE(代

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

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