..MindWrite..

Posts Tagged ‘ant’

Ant “Unable To Locate tools.jar”

Posted by guptaradhesh on April 6, 2011

While running an ant, if we get an error/warning that says unable to locate tools.jar, then we are seeing the wrong java version from the one you set in JAVA_HOME.

i.e. Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar

Just try changing your JAVA_HOME environment variable. In most cases either JAVA_HOME is not set or is set to “\jdk5\bin”, and they have to remove the “\bin” part, because ant looks for “%JAVA_HOME%\bin\java*”. This is because ant looks for “C:\Program Files\Java\jdk5\bin\bin\java.exe”.

Reference: web

Advertisements

Posted in java | Tagged: , | 2 Comments »