ERROR - Could not find artifact at specified path /lib/tools.jar


Failed to execute goal on project : Could not resolve dependencies for project jar: Could not find artifact at specified path /../lib/tools.jar

while building projects using Maven.


1. Tools.jar is not available at the specified location. There could be 2 reasons for it.

a. You didn't downloaded JDK and just installed JRE.
b. Your JAVA_HOME is not set to the correct directory.

2. Problem with the POM Dependencies

3. Problem due to different paths ( \ / ) on Windows and Unix.


Make sure that tools.jar is available at the location specified in error. If you have installed only JRE , install JDK and set the JAVA_HOME appropriately.

If it doesn't resolve by above, add the following entry in your POM file