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.