简体   繁体   中英

missing tools.jar error on Update Maven Project

When i try to update maven project I get the error that maven cant find tools.jar in JRE locations shown below: 在此处输入图片说明 However I have installed and specefied JDK in Windows->Preferences->Java->Installed JRE. Is there any other place the JDK should be specified in order to resolved this tools.jar issues.

Note: tools.jar is located in lib of JDK_HOME directory and i also specified the jar as mentioned in this answer but it did not resolve issue.

Go to pom.xml and then:

<profiles>
    <profile>
      <id>default-tools.jar</id>
      <activation>
        <property>
          <name>java.vendor</name>
          <value>Sun Microsystems Inc.</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.4.2</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM