Missing tools-1.6.jar with Eclipse and Maven

Soren Johnson picture Soren Johnson · Aug 27, 2011 · Viewed 38.1k times · Source

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?

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

Answer

Brimstedt picture Brimstedt · Oct 19, 2011

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

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

For example:

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

New line after -vm is crucial.

it should be right above

-vmargs

See also Eclipse Maven Plugin Configuration Problem