How to install Apache Ant on Windows 10?


How to install Apache Ant on Windows 10?

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. – by


  1. JDK


We can download the Apache Ant from the official site of Apache Ant. The download link has been given below.

I have downloaded the Apache ant 1.9.14 version zip file and saved into my machine.

Apache Ant Zip file

Extract the downloaded zip file now. The extraction may take time depending the file size.

Apache Ant extracted file


Follow the below steps to set the environment variable for Apache Ant. The steps are given below .

#1. Go to the My Computer –> Properties

This image has an empty alt attribute; its file name is image-4.png
My Computer –> Properties

#2. Open the Environment Variable window by clicking the Advanced System Settings –> System Properties –> Environment Variables…

This image has an empty alt attribute; its file name is image-53.png
Environment variables

#3. Select the System variable “Path” and click the “Edit” button.

This image has an empty alt attribute; its file name is image-54.png
System variables

#4. Click the “New” button on the edit environment variable window and the add the Apache Ant extracted file location up to the bin folder and then click “OK” button. In my system, I have downloaded and extracted the Apache Ant zip file on the following location up to bin folder.

Apache Ant Environment Path


To set the ANT_HOME environment variable follow the below steps.

#1. Click “New” button on the System variable window and provide the variable name is “ANT_HOME” and variable value is Apache Ant zip file extracted path. In my system, I have download and extracted the zip file on the following location.


#2. Click “OK” button on all opened windows and open the new command prompt to execute the following command to check the Apache Ant version. The Apache Ant version should be 1.9.14.

ant -version
Apache ant version

Apache Ant installation has been done on Windows 10.

How useful was this post?

Click on a star to rate it!

As you found this post useful...

Follow us on social media!


Post your comments