更新时间:2022-06-20 00:48:35
jdk.tools:jdk.tools
(或 com.sun:tools
,或任何你命名的it) 是一个与 JDK 一起分发的 JAR 文件.通常你将它添加到 Maven 项目中,如下所示:
jdk.tools:jdk.tools
(or com.sun:tools
, or whatever you name it) is a JAR file that is distributed with JDK. Usually you add it to maven projects like this:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
请参阅 Maven 常见问题解答,用于将依赖项添加到 tools.jar
一个>
或者,您可以使用以下方法在本地存储库中手动安装 tools.jar
:
Or, you can manually install tools.jar
in the local repository using:
mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.6 -Dfile=tools.jar -DgeneratePom=true
然后像 Cloudera 一样引用它,使用:
and then reference it like Cloudera did, using:
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.6</version>
</dependency>