How to install Apache Ant on windows

In this post you will learn how to install Apache Ant  on windows.

Apache Ant  is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks…(more)

Installing Apache Ant

Note:  To install apache-ant you will also need a JDK installed on your system


Download Apache Ant 1.9.0 is now available for download as source or binary from

Step 2:

Uncompress the downloaded file into a directory l(C:\Program Files\apache-ant-1.9.0).

Step 3 :

Set environmental variables ‘JAVA_HOME‘ to your Java environment, ‘ANT_HOME‘ to the directory you uncompressed Ant to, and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to your PATH.

For Windows XP: To set environment variables on Windows XP, right click on My Computer and select Properties. Then go to the Advanced tab and click the Environment Variables button at the bottom.

appache antapacheant

and also add this to PATH variable ‘;C:\Program Files\apache-ant\bin;C:\Program Files\Java\jdk1.7.0_01\bin’

Step 4:

Once you’ve done that and applied the changes, you’ll need to open a new command prompt to see if the variables are set properly. You should be able to simply run ant and see something like this:

Buildfile: build.xml does not exist!
Build failed

That means Ant is installed properly and is looking for a build.xml file.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s