Perhaps you are running on a JRE rather than a JDK?

修改pom文件

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>utf-8</encoding>
<useDefaultDelimiters>true</useDefaultDelimiters>
<fork>true</fork>
<!--指定你的jdk地址-->
<executable>
C:Program FilesJavajdk1.8.0_73injavac.exe
</executable>
</configuration>
</plugin>

原文地址:https://www.cnblogs.com/kali5k/p/13378337.html