Article directory
Problem Description
- When operating the HBase API client, an error is reported: Unable to resolve jdk.tools:jdk.tools:1.6
- This kind of problem is commonplace. It is nothing more than the dependency is not downloaded, the version problem, the dependency is not loaded successfully, the file index is not updated successfully, and the IDEA file cache is not updated. When I tried all the above, I found that it still didn’t work. By the way, Maven's prompt is as follows:
solution
- After some searching and trying, I offer three different solutions here.
The first solution: (strongly not recommended!) , don't try it, it's easy to be scolded. . . . .
-
There is a problem with this dependency, right? Just get rid of him! Whoever has a problem solves it!
-
The specific solution is as follows: Exclude this
jdk.tools
dependency!<dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> <version>1.3.1</version> <exclusions> <exclusion> <artifactId>jdk.tools</artifactId> <groupId>jdk.tools</groupId> </exclusion> </exclusions> </dependency>
The second solution: (I tried it, it can be solved but I didn't use it!)
-
Manually install **
tools.jar
** to the local repository:mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.6 -Dfile=tools.jar -DgeneratePom=true
<dependency> <groupId>jdk.tools</groupId> <artifactId>jdk.tools</artifactId> <scope>system</scope> <systemPath>${ java.home}/../lib/tools.jar</systemPath> </dependency>
The third solution: change the JDK version
- Refer to the second solution. Doesn’t he need a
tools.jar
package? Give it to him! - Look at this picture! , version 1.8 is available!
- However, there is no reason for the jdk11 version
tool.jar
(I deleted it after trying the second solution)