Installing and Configuring Apache Ant



Apache Ant is an open source build tool. A build tool can be used to compile the source code, creating the build artifacts such as JAR, WAR, and EAR files. Some of the other usage of ANT is to run Automated Selenium Tests.

Ant is a powerful build tool and also is very much extensible. There are several open source Ant libraries available which need to be just downloaded, unzipped, and copied (JAR file) into the Ant’s “lib” folder. Once the library file is copied, then we can utilize the “Tasks” in the Ant’s build.xml file. Ant’s “contrib library, jsch library, etc” are the best examples for such libraries.

Install and configure ANT

1. Download ANT from Apache web site – ANT download link


2. Unzip the ant and copy to C:\Ant folder

3. Now we need to configure environment variables: ANT_HOME

4. Navigate to environment variables and click on new button.

5. Enter Variable name as ANT_HOME and Variable Value as C:\apache-ant-1.8.4.Then click on OK button


6. Now select the PATH and click on EDIT button

7. Now give the semicolon (;) at the end and add ANT path up to bin folder


8. Now click on OK button and go to command prompt and type ANT.

“It will give message as build.xml not fount”


9. Now to fix tools.jar file missing error that we have to download jdk1.6 or later.