title: ant build : unable to locate tools.jar. Expected find it in C:\Program Files\Java\jre7\lib\tools.jar
body: <p>I know that this question is popular, but no one of solutions can help me. 
  I used <a href="https://stackoverflow.com/questions/14394768/unable-to-locate-tools-jar-expected-to-find-it-in-c-program-files-java-jre6-li">this</a>, <a href="https://stackoverflow.com/questions/6676107/unable-to-locate-tools-jar">this</a>, <a href="https://stackoverflow.com/questions/9527271/build-xml-expects-tools-jar-at-a-different-location">this</a> and <a href="https://stackoverflow.com/questions/9930181/ant-build-not-working-unable-to-find-a-javac-compiler">this</a> solutions, but no one help me. </p>
  
  <p>I want to implement <a href="http://developer.android.com/tools/testing/testing_ui.html#builddeploy" rel="noreferrer">uiautomator Tests</a> and need to build my build.xml with ant, but get this strange error.</p>
  
  <p>I use Windows 8.1</p>
  
  <p>My JAVA_HOME system variable set to c:\programs files\java\jdk1.7.0_51 and to c:\programs files(x86)\java\jdk1.7.0_51</p>
  
  <p>My PATH system  variable set also to %JAVA_HOME%/bin, my %ANT_HOME% is set to c:\apache-ant.</p>
  
  <p>But when I execute ant build in the android app derictory I get the </p>
  
  <pre><code>unable to locate tools.jar. Expected find it in C:\Program Files\Java\jre7\lib\tools.jar
  BUILD FAILED
  Perhaps JAVA_HOME does not point to the JDK
  </code></pre>
  
  <p>But my JAVA_HOME points to right JDK ! I confused with this. I also rebuild my build several times, I've got the same. </p>
  
  <p>Will be glad if somebody help me.</p>