No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK
maven 打包出现:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
1》(不要用默认的jre ,需要用jdk编译)
ou can choose any of following solution to fix [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?.
Solution - 1 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK
- Click on Windows -> Preferences -> Java -> Installed JREs -> Add -> Standard VM and Select JAVA_HOME.
- Select New JRE from Installed JREs and Press OK
pom.xml中控制maven引用的版本
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>