缺少Eclipse和Maven的tools-1.6.jar

问题描述:

我试图在Eclipse中使用Maven运行一个项目,但是在下面却遇到了此错误. tools.jar 在JDK的 lib 文件夹中,但是 tools-1.6.jar 在我的计算机上似乎不存在.我正在使用JDK 1.7,而我的 JAVA_HOME 指向该文件夹(我的 eclipse.ini 也是如此)任何人都知道我可以在哪里获得此文件或我可能正在做什么错了吗?

I am trying to get a project to run using Maven in Eclipse, but I am getting this error below. The tools.jar is in the JDK's lib folder, but tools-1.6.jar doesn't seem to exist on my computer. I am using the JDK 1.7 and my JAVA_HOME is pointing to that folder (as is my eclipse.ini) Anyone know where I can get this file or what I might be doing wrong?

容器"Maven Dependencies"引用了不存在的库 C:\ Users \ sejohnson \ .m2 \ repository \ com \ sun \ tools \ 1.6 \ tools-1.6.jar

The container 'Maven Dependencies' references non existing library C:\Users\sejohnson\.m2\repository\com\sun\tools\1.6\tools-1.6.jar

工具x.y.z.jar应该由您的JDK提供.

The tools-x.y.z.jar should be provided by your JDK.

通过在eclipse.ini中添加-vm选项,确保Eclipse由JDK运行,而不是由JRE运行.

Make sure that eclipse is run by JDK and not by JRE by adding -vm option in eclipse.ini.

例如:

-vm
C:\Program Files\Java\jdk1.6.0_26\bin\javaw

-vm 之后的新行至关重要.

New line after -vm is crucial.

它应该在

-vmargs

另请参见 Eclipse Maven插件配置问题