Home > Ant Installation & Configuration > Ant Installation & Configuration

Ant Installation & Configuration



At the time of this post, the latest stable version available form Apache is 1.7. Older releases of Ant can be found here. Old releases are only provided as zip archives that can be extracted by jar xf archive.zip. Its highly recommend to not use old releases but upgrade to Ant’s latest release.

Ant 1.5.4 is the last release that supports JDK 1.1, Ant 1.6.0 onwards requires JDK 1.2 or later. There will be no other compatibility issues with Java versions otherwise. Current version of Ant i.e., 1.7, requires JDK version 1.2 or later, 1.5 or later is strongly recommended. Latest the version of Java is, the more Ant tasks you get. If a JDK is not present, and only JRE is present, then many tasks will not work.


Follow the steps below to download, install and configure Ant :

  •  Download Apache Ant (apache-ant-<version>-bin) from here. (bin – The binary distribution of Ant includes the latest version of the Apache Xerces2 XML parser. To build and use Ant, you must have a JAXP-compliant XML parser installed and available, so downloading binary distribution will suffice).
  • Unzip it in a directory. Let’s call this directory “antroot”. Ex: D:\Technical Software\apache-ant-1.7.1. Note: Exactly under this directory, you should be able to find bin, lib, etc.
  • Create an environment variable named “ANT_HOME” that points to your “antroot” directory. Ex: ANT_HOME – D:\Technical Software\apache-ant-1.7.1



  • Modify the “PATH” environment variable to include the “%ANT_HOME%\bin” directory (so that you’ll be able to type “ant” command in a command prompt, in any directory and it will call the “%ANT_HOME%\bin\ant.bat” script. Ex: path – D:\Technical Software\apache-ant-1.7.1\bin


Verify your Ant installation. To do this type ant -version at the command prompt. Your output should look something like this: “Apache Ant version 1.7.1 compiled on June 27 2008”

  • Ant is successfully installed on your computer!



Follow the video tutorial for download, install and configuration instructions:


Vodpod videos no longer available.


If you prefer the source edition, you can download the source for the latest Ant release from http://ant.apache.org/srcdownload.cgi. If you prefer to access the code as it is being developed via SVN, get it from accessing SVN.



The ant.bat script in “%ANT_HOME%\bin” directory makes use of three environment variables – ANT_HOME, CLASSPATH and JAVA_HOME. Ensure that ANT_HOME and JAVA_HOME variables are set, and that they do not have quotes (either ‘ or “) and they do not end with \ or with /. Do not set CLASSPATH. Ant does not need it, it only causes confusion and breaks things.









  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: