很多框架都会依赖jdk中的tools.jar,但是maven仓库中却没有.

如在eclipse+maven编写mapreduce代码,就会报Missing artifact jdk.toos:jdk.toos:jar:1.6

如何解决这个问题呢,只需要在项目的pom.xml 文件中加入以下配置,指定maven去本地寻找 tools.jar、

<dependency>
        <groupId>jdk.tools</groupId>
        <artifactId>jdk.tools</artifactId>
        <version>1.6</version>
        <scope>system</scope>
        <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
    </dependency>

注意:它报哪个版本你就写哪个版本。

eclipse的maven项目报Missing artifact jdk.toos:jdk.toos:jar:1.6错的更多相关文章

  1. eclipse新建maven项目报错Could not resolve arachetype org.apache.maven.archetypes:mmaven-archetype-quickstart:1.1 from any of the configured repositories

    使用eclipse新建maven项目,按下图所示选择后,报错 报错截图 报错详细信息 Could not resolve archetype org.apache.maven.archetypes:m ...

  2. Eclipse 导入Maven 项目报错

    新建Maven项目时出错:org.apache.maven.archiver.MavenArchiver.getManifest   新建Maven项目时出错:org.apache.maven.arc ...

  3. maven工程pom.xml报Missing artifact net.sf.jasperreports:jasperreports:jar:6.2.0

    有时maven工程的pom.xml报以下类型错误: Description Resource Path Location TypeMissing artifact net.sf.jasperrepor ...

  4. 关于Eclipse导入maven项目报空指针异常

    今天新建了一个maven项目,因为是通过公司的工具新建的,代码拉下来就有src.pom.xml文件. 导入Eclipse却报空指针异常.具体如下: An error has occurred. See ...

  5. Eclipse创建Maven项目报错的解决

    报错1:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart 起因:删除一个用quick ...

  6. 新建maven指定jdk版本-eclipse新建maven项目报错The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的解决方案

    具体表现为: 使用Eclipse+Maven建立了一个Javaweb工程,JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.Http ...

  7. 全盘解决eclipse之maven项目报错

    每次新建maven的web(war包方式)项目时都会报错而且都要手动改,很麻烦 解决:(注意里面的jdk版本换成自己的) 改变maven配置文件   settings.xml 在文件的<prof ...

  8. Eclipse 创建maven项目 报错 one or more constraints have not been satisfied

    首先 在 pom.xml > plugins 中添加 <plugin> <groupId>org.apache.maven.plugins</groupId> ...

  9. Eclipse中maven项目报错:org.springframework.web.filter.CharacterEncodingFilter

    写了一个demo,发现在tomcat中部署完项目,启动时报错. 1,问题描述 2,解决办法 1)程序在部署完成后报错,说明是程序是编译通过的,即编译编译路径Java Build Path没问题.2)此 ...

随机推荐

  1. 修改C# 新建类模板

    找到安装路径下的这个文件夹:D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplatesCache\CSh ...

  2. Error: Cannot open main configuration file '//start' for reading! 解决办法

    当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...

  3. 开启macbook win7触控屏右键

    开启macbook win7触控屏右键,如下图

  4. excel 导入 sqlserver 字符串被截取为255长度解决方案

    excel表格导入sqlserver数据表中 内容被截取为255长度的字符串. 注意:excel是通过前8行(表头的首行除外)的数据类型来判断导入数据的数据格式的,例如前8行出现整数型,那么默认就用整 ...

  5. mac上执行sed的编辑 -i命令报错sed: 1: "test.txt": undefined label ‘est.txt’或sed: 1: "2a\test\": extra characters after \ at the end of a command

    问题一 sed编辑命令:[sed -i 's/a/b/g' test.txt]   报错:sed: 1: "test.txt": undefined label 'est.txt' ...

  6. 分享一个MarkDown的配色主题

      下载地址(戳我)

  7. 干货|宏巍软件之Java线程监控之旅

    宏巍软件 许向 大家好,我是上海宏巍信息技术有限公司(简称:宏巍软件)的许向,宏巍软件成立于2005年,是一家以电商ERP软件开发为主的高新技术科技型软件公司,致力于为大型网商和电子商务企业提供专业. ...

  8. 找到文字进行标记(replaceWith)

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. leveldb 学习笔记之log结构与存取流程

    log文件的格式 log文件每一条记录由四个部分组成: CheckSum,即CRC验证码,占4个字节 记录长度,即数据部分的长度,2个字节 类型,这条记录的类型,后续讲解,1个字节 数据,就是这条记录 ...

  10. [转]CryptographyHelper.cs

    using System; using System.IO; using System.Security.Cryptography; using System.Text; public class C ...