Ant, Java

How to install Ant on Windows?

1. Install Java Development Kit (JDK)

The most recent version of JDK can be downloaded from Oracle’s website.

Once you have downloaded and installed JDK on your machine, set the ‘JAVA_HOME’ environment variable.

JAVA_HOME

Modify the ‘Path’ environment variable to include ‘JAVA_HOME’

Path

Verify that the Java was installed correctly, by opening the command prompt and running ‘java -version’. This should print the version of Java you have just installed on your machine.

2. Download Apache Ant

Download the most recent version of Ant from the Apache’s Ant site.

Extract the downloaded zip file in the appropriate folder.
Example: C:\Program Files\Apache Software Foundation\apache-ant-1.9.3

3. Set Ant Environment Variables

Set ‘ANT_HOME’ environment variable.

ANT_HOME

Modify the ‘Path’ environment variable to include ‘ANT_HOME’

ANT_PATH

4. Verify

Verify that the Ant is installed correctly, by opening the command prompt and running ‘ant -version’. This should print the version of Ant you have just installed on your machine.