设为首页 加入收藏

TOP

关于pom.xml文件下Missing artifact jdk.tools:jdk.tools:jar:1.8报错
2019-05-11 00:12:33 】 浏览:70
Tags:关于 pom.xml 文件 Missing artifact jdk.tools:jdk.tools:jar:1.8 报错

一.问题

创建maven项目,导入Hadoop-xxx文件时,发现pom.xml文件报错Missing artifact jdk.tools:jdk.tools:jar:1.8

二.图片
这里写图片描述

三.解决

  • 原因:tools.jar包是JDK自带的,pom.xml中以来的包隐式依赖tools.jar包,而tools.jar并未在库中,只需要将tools.jar包添加到jdk库中即可。
  • 解决方案:在pom文件中添加如下代码即可。
        <dependency>
            <groupId>jdk.tools</groupId>
            <artifactId>jdk.tools</artifactId>
            <version>1.8</version>
            <scope>system</scope>
            <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
        </dependency>

四.结果

这里写图片描述

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇HBASE(一)—— HBase的基本操作.. 下一篇水仙花数——数论问题系列

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目