title: Why is ant looking for tools.jar in the wrong dir?
body: <p>I am trying to execute `ant -version' and I get </p>
  
  <pre><code>C:\Users\owner&gt;ant -version
  Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
  Apache Ant(TM) version 1.8.4 compiled on May 22 2012
  </code></pre>
  
  <p>I checked all of my environment variables and I cant find a reference to <code>C:\Program Files\Java\jre7</code></p>
  
  <p>I have the JDK and JRE installed at <code>C:\Program Files (x86)\Java\jre7</code> and <code>C:\Program Files (x86)\Java\jdk1.7.0_10</code></p>
  
  <p>I also have stuff in <code>C:\Program Files\Java\jre7</code> and <code>C:\Program Files\Java\jdk1.7.0_10</code></p>
  
  <p>Can anyone tell me why ant is looking in the wrong directory?</p>
  
  <p>I have seen a bunch of other questions on stackoverflow but none of them solve my issue.</p>
  
  <p>output of %path% is</p>
  
  <pre><code>C:\Users\owner&gt;echo %path%
  %CommonProgramFiles%\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Window
  s;C:\Windows\System32\Wbem;C:\Program Files (x86)\CyberLink\Power2Go;C:\Program
  Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsof
  t SQL Server\90\Tools\binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Window
  s\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_24\bin;C:\Prog
  ram Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jdk1.7.0_10;C:\Program Fil
  es (x86)\Android\android-sdk\tools\apache-ant-1.8.4\bin;C:\Program Files (x86)\A
  ndroid\android-sdk\platform-tools\;C:\Program Files (x86)\Android\android-sdk\to
  ols\;C:\Program Files\Common Files\Microsoft Shared\Windows Live
  
  C:\Users\owner&gt;echo %JAVA_HOME%
  %ProgramFiles(x86)%\Java\jdk1.7.0_10
  </code></pre>