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.

Tools Used :

  1. JDK 1.7
  2. Apache Ant 1.9.4
  3. Windows 8.1

1. JAVA_HOME

Make sure JDK is installed, and JAVA_HOME is configured as Windows environment variable.

install-ant-on-windows-1

2. Download Apache Ant

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

install-ant-on-windows-2

Assume you unzip to this folder – C:\apache-ant-1.9.4

install-ant-on-windows-3

3. Add ANT_HOME

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

install-ant-on-windows-4

4. Update PATH

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

install-ant-on-windows-5

5. Verification


C:\Users\mkyong>ant -v
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
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.

References

  1. Install Apache Ant