“Unable to locate tools.jar” when running ant [duplicate]
问题 This question already has answers here : Unable to locate tools.jar (29 answers) Closed 6 years ago . When running ant, I get the following message: Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar I have JAVA_HOME set to C:\Program Files\Java\jdk1.7.0_02 , PATH includes C:\Program Files (x86)\Java\jdk1.7.0_02\bin , CLASSPATH includes C:\Program Files (x86)\Java\jdk1.7.0_02 , and ANT_HOME is set to C:\ant . It seems that ant is ignoring all of these