I'm using Home windows 7 x64 and then try to install Apache Ant. I usually obtain the following error message:

C:Usersxxx>ant Not able to discover tools.jar. Likely to think it is in C:Program FilesJavajre6li btools.jar Buildfile: build.xml does not exist! Build unsuccessful

In a variety of forums they are saying the atmosphere variables aren't set properly. I set them as following:

ANT_HOME: C:Ant

CLASSPATH: C:Program FilesJavajdk1.6._21bin

JAVA_HOME: C:Program FilesJavajdk1.6._21bin

Path: (...a lot of things...)C:Program FilesJavajdk1.6._21binC:antbin%JAVA_HOME%bin

However i get the mistake. Are you aware how you can pressure ant, to make use of the right directory? Java (both JRE and JDK) come in Program Files and Program Files (x86). And appears attempting to make use of the 64x JRE.

JAVA_HOME ought to be C:Program FilesJavajdk1.6._21 (drop the "bin") and tools.jar will probably be in lib, not bin.

Look into the "a lot of thingsInch path Body of individuals likely includes a java executable inside it.

Within the (...a lot of things...) area have you got a road to the JRE? Try getting rid of it. Also, rather than using %JAVA_HOME% inside your path, you can test setting the entire path (thought it will work, I've had challenges before).

Lastly for JAVA_HOME, take away the bin