[英]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: 当我尝试更新Maven项目时,出现如下错误:Maven无法在JRE位置中找到tools.jar,如下所示:
However I have installed and specefied JDK in Windows->Preferences->Java->Installed JRE.
但是我已经在Windows->首选项-> Java->已安装的JRE中安装并指定了JDK。 Is there any other place the JDK should be specified in order to resolved this tools.jar issues.
为了解决此tools.jar问题,是否应指定JDK的其他位置。
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. 注意:tools.jar位于JDK_HOME目录的lib中,我也指定了此答案中提到的jar,但它没有解决问题。
Go to pom.xml and then: 转到pom.xml,然后:
<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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.