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.
![Click on Windows -> Preferences -> Java -> Installed JREs -> Add -> Standard VM and Select JAVA_HOME](http://www.kriblog.com/user/www/click-on-windows-preferences-java-installed-jres-add-standard-vm-and-select-java-home-1419886702921.png)
- Select New JRE from Installed JREs and Press OK
![Select New JRE from Installed JREs and Press OK](http://www.kriblog.com/user/www/select-new-jre-from-installed-jres-and-press-ok-1419886795077.png)
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>