Unable to locate tools.jar

Wassim AZIRAR picture Wassim AZIRAR · Jul 13, 2011 · Viewed 132.9k times · Source

Possible Duplicate:
Unable to locate tools.jar

I'm trying to use ant to compile using this command :

 ant compile

I don't know if the problem comes from my windows 64bit, or by something else. Because I have java Installed in the 64 & 32 prog files.

Java 64 & 32

I downloaded apache-ant-1.8.2-bin and putted it in C:\Program Files\apache-ant-1.8.2

I tried to put ant everywhere, I switched also the ENV PATH between java 64 and 32 but everytime I get this error message :

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

I searched for tools.jar in the ant lib folder, in the java 64 and 32, but no trace of it in the system.

What do you think ?

Answer

Sean Patrick Floyd picture Sean Patrick Floyd · Jul 13, 2011

A JRE doesn't have a tools.jar, you need a JDK. Set your JAVA_HOME and PATH variables so that they point to a JDK, not a JRE.