To install Apache Ant on Windows, you just need to download the Ant’s zip file, and Unzip it, and configure the ANT_HOME Windows environment variables.

Prerequisites: JDK should be installed in your system.

1. CONFIGURE JAVA_HOME AS WINDOWS ENVIRONMENT VARIABLE

2. DOWNLOAD APACHE ANT:

Go to Apache Ant official website, download the Ant binary zip file, for example : apache-ant-1.9.5-bin.zip, unzip it to the folder you want to store Apache Ant.

3. UNZIP IT TO THE FOLDER YOU WANT TO STORE APACHE ANT:

For example: C:apache-ant-1.9.5

4. ADD ANT_HOME:

Add ANT_HOME as the Windows environment variable, and point it to your Ant folder.

5. UPDATE PATH:

Update Path variable, append %ANT_HOME%bin at the end, so that you can run the Ant’s command everywhere.

6. VERIFICATION:
Go to Command Prompt, type ant -version and hit Enter key.

C:UsersDell5>ant -version
Apache Ant(TM) version 1.9.5 compiled on June 20 2015
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed

If you see a similar message above, means the Apache Ant is installed successfully on Windows.

Reference: Installing Apache Ant

Leave a Comment