在pom.xml添加如下 配置文件
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.8.0</version>
<scope>system</scope>
<systemPath>C:/Program Files/Java/jdk1.8.0_31/lib/tools.jar</systemPath>
</dependency>