MAVEN builds Hadoop environment report missing artifact jdk.tools:jdk.tools:jar:1.7 (5 ways, 2 positive solutions)

Source: Internet
Author: User

Just write the article, is the online more mainstream solution.

In view of the actual situation, the partner's machine did not encounter this problem, we will explore the reasons, and finally there are 4 circumstances need to explain.


First, another "positive solution".

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.0.1.1</version>
<exclusions>
....
<exclusion>
<artifactId>jdk.tools</artifactId>
<groupId>jdk.tools</groupId>

</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.5.1</version>
<exclusions>
。。。
<exclusion>
<artifactId>jdk.tools</artifactId>
<groupId>jdk.tools</groupId>
</exclusion>
</exclusions>
</dependency>

The configuration of HBase and Hadoop excludes Jdk.tooks, which was previously just the Hadoop configuration.


3 other scenarios or attempts

1. On a partner's machine, without the exclusion and configuration of Maven, there is no error, which is rather odd.

2. A partner recommends configuring Java, MAVEN home variables, Classpath, Path, no OVA.

3. Suggested by netizens: http://www.educity.cn/wenda/466544.html, no eggs.

There is no workaround for Tools.jar in Eclipse
cause: Eclipse uses C:\windows\system32\javaw.exe as the JVM by default, so Tools.jar is not found

here's how to fix it:
1, modify the Eclipse.exe directory of Eclipse.ini, join
-VM%java_home%\bin\javaw.exe

The premise is that java_home must be defined in the environment variable, and if not defined, a complete absolute path is required.
2. Start eclipse again.
3, OK.

(need to explain is-VM, put in the last line of Eclipse.ini , Eclipse start error, put on line 1th normal)


-----------------------

Summary: There are 2 kinds of better solutions, 3 special cases and attempts.

Online comparison of the mainstream of the way, we did not adopt, but we have found ourselves, this article mentioned in the exclusion of jdk.tools this approach.


Speaking of the elimination of this problem, I think the pom file is not used skillfully.

Open the Pom file, depency Hierarchy, search Tools.jar, manually exclude the dependent Tools.jar, and then will automatically modify the Pom.xml file, save just fine.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

MAVEN builds Hadoop environment report missing artifact jdk.tools:jdk.tools:jar:1.7 (5 ways, 2 positive solutions)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.