No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
网上试了好多方法。。只有一个在settings里面添加这么一段的有用
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<executable>E:/JAVA/jdk/bin/javac.exe</executable>
</configuration>
</plugin>
</plugins>
</build>
有大神告诉我能够一劳永逸的方法吗??