I have problem setting up %PATH% for ant. I think I have done it correctly, still it doesn’t work from cmd.exe
Here is what echo %ANT_HOME% shows
C:\Users\Fero>echo %ANT_HOME%
c:\ant
and echo %PATH%
C:\Users\Fero>echo %PATH%
.
.
LLIB\SAMPLES\REPL;C:\Program Files (x86)\Nmap;"C:\Users\Fero\AppData\Local\Andro
id\android-sdk\platform-tools;C:\Development\android-sdk-windows\tools;%JAVA_HOM
E%\bin;c:\ant\bin;C:\Ruby193\bin;
and this is actual call for ant
C:\Users\Fero>ant
'ant' is not recognized as an internal or external command,
operable program or batch file.
However if I do it manually:
C:\Users\Fero>c:\ant\bin\ant -version
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\li
b\tools.jar
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
There also seems to be additional problem, my jre directory has all sorts of .jar files but none called tools.jar
Tools.jar: it’s insideJDK, notJRE. Please, install jdk and setJAVA_HOMEto the installation directory.Also, check you
PATHenvironment variable. Two lines with dots look very strange. And there is non-matching quote in path.And output of
dir %ANT_HOME%can solve many problems.