I am using windows 7 java installed in Program files and Program Files (x86).
I am getting such error "Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
I have set path variable to `C:\Program Files\Java\jdk1.7.0_51;` JAVA_HOME `C:\Program Files\Java\jdk1.7.0_51;`
But I tried ant -diagnostics
command get java.home is C:\Programe Files\Java\jre7\
Best Answer
If you have installed
Java Development Kit (JDK)
you can find this Jar at the place.I seems you have installed only
Java Runtime Environment (JRE)
So if tools.jar is not there at the path
C:\Program Files\Java\jre7\lib\
, try placing it manually at the path.It should solve your problem.