Installing Ant on Windows

This entry is a summary of the Apache guide for Installing Ant. It is targeted specifically for Windows.

  1. Download the current release of Ant and place its contents under C:\Program Files\ant\.
  2. Set the JAVA_HOME user variable under Environment Variables to a JDK, and not a JRE. In my case, this is %PROGRAMFILES%\Java\jdk1.6.0_06.
  3. Modify the PATH user variable and append %PROGRAMFILES%\ant\bin to the end of the list.

Opening a command prompt and running ant -version, we obtain the following result:

C:\Users\tbarik>ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

The Ant installation recommends setting the ANT_HOME variable to %PROGRAMFILES%\ant as well, but this can be redundant as the script automatically checks for this location.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>