[BUG]Could not find artifact jdk.tools:jdk.tools:jar:1.6 at specified path D:\soft\jdk8/../lib/tools

0 background

After writing the code in IDEA and preparing to open the jar package, this error is reported. It is very strange that this problem has never occurred before.
insert image description here

1 solution

By checking the mven dependencies, it is found that there is a jdk6 tool.jar in it.
insert image description here
This is because the hive-exec-1.2.1 version needs to rely on the jdk-1.6 tool.tar, which cannot be downloaded in the IDE.
You can download the dependency through the pom.xml of eclipse, and import it into IDEA after the download is successful.
insert image description here
It is very strange here that the same maven dependency reports an error in IDEA, but it can be downloaded normally through Eclipse, as follows.
insert image description here
After the Eclipse download is complete, specify the specific address in the tool.jarmaven repository of jdk6 in IDEA.
insert image description here
Just select the location of the jar package. Note: The address of the maven warehouse here is the address configured in setting.xml in your maven software, just find the corresponding jar package according to the configuration.
insert image description here
Then recompile and find that the compilation can pass.
insert image description here

Guess you like

Origin blog.csdn.net/Keyuchen_01/article/details/128345536