Tools.jar missing solution in maven


Add the following paragraph to your pom file
<dependency>
        <groupId>jdk.tools</groupId>
        <artifactId>jdk.tools</artifactId>
        <version>1.7</version>
        <scope>system</scope> 
        < systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
    </dependency>

where ${JAVA_HOME} needs to be configured with your own environment variables, if not configured, you can also write your jdk directory directly here, but then you After the pom is modified, it cannot be submitted, because others are not in this directory

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326218919&siteId=291194637
Recommended