Apache Ant installation on windows

Apache Ant is a Java library, that helps in building software project artifacts.  Build files are written in XML to support open standard, portable and easy nature of XML. Using Ant, you can automate build and deployment process. As it is a Java library, requires Java on the windows to setup Ant.

Apache Ant Installation on Windows

1.Install Java on Windows

Download and install Java on windows. Don’t know how to setup Java environment? follow this article to install appropriate version of Java on windows.

2. Download Apache Ant

Download Apache Ant from the official Apache website – http://ant.apache.org/. Select zip version of binary distribution for windows environment. .tar versions are suitable for Unix / Linux flavor environment.

3. Extract Binary Distribution

Extract, downloaded zip version of binary distribution to some place, let say C: drive and rename the folder as “ant” for the convenience. Extracted distribution would now be located at c:\ant

4. Setting up Environment Variables

  • ANT_HOME
  • Path

To add environment variables on windows, right click on MyComputer and select properties. Under the left side bar, select Advanced System Settings, a window would popup with set of options, hit the “Environment Variables” push button to open a window for adding environment variables. Add new environment variable ANT_HOME  and give value as root directory of ant installation i.e.  C:\ant

Append Path to add bin folder of ANT for executing ANT commands from the command-line. Path :  %Path%;C:\ant; 

5.Verification of Installation

Open command prompt and issue this command ant -version . If everything goes right, that should give output as below.

C:\Users\shankar>ant -version
Apache Ant(TM) version 1.9.3 compiled on December 23 2013

C:\Users\shankar>

Leave a Comment