Installing apache Ant on Windows


Apache Ant is a Java library and command line tool that help in building softwares.

First of all download the zip file from ant.apache.org and extract it to a feasible location say c:\ant.

Now you need to tell windows about your Ant installation. You can do this by creating system variables. To do this, you need to go to the Environment variables of your operating system. If you're using Windows XP or earlier, you need to:

  1. Right-click My Computer, and then click Properties.
  2. Click the Advanced tab.

If you're using Windows Vista or 7, you need to:

  1. Right-click My Computer, and then click Properties.
  2. In the left navigation panel find Advanced System settings. Click on it.

Click Environment variables.

Now go to the system variables section and click on New to add a new variable.

  1. Write ANT_HOME in the variable name field.
  2. Write c:\ant in the variable value field
  3. Click OK

Again click on new variable.

  1. In the variable name field, write JAVA_HOME.
  2. In the variable value field, you need to provide the path to the Java installation on your machine. Generally, it is in c:\Program Files\Java\ Java version on your system \bin. The easy way to do this is to go to c:\ -> Program Files -> Java -> JDK version -> bin. Now copy the path from the address bar above and paste it in the value field. Say, if you're using JDK version is 1.7.0, in the variable value field you can write, C:\Program Files\Java\jdk1.7.0\bin.

Finally, click on the Path variable in the system variables section and click Edit.

In the variable value field, go to the end of the line and add a semi-colon (;). Now write %ANT_HOME%\bin. That's it, you're done.

To check your installation, go to start -> Run and type %ANT_HOME%\bin. If you've done everything correctly, it'll take you to the c:\ant\bin folder.