Saturday, June 20, 2015

How to install Apache Ant on Windows

To install Apache Ant on Windows, you just need to download the Ant’s zip file, and Unzip it, and configure the ANT_HOME Windows environment variables.

Prerequisites: JDK should be installed in your system. See How to install JDK on Windows


1. Configure JAVA_HOME as Windows environment variable:









2. Download Apache Ant:


Go to Apache Ant official website, download the Ant binary zip file, for example : apache-ant-1.9.5-bin.zip, unzip it to the folder you want to store Apache Ant.




3. Unzip it to the folder you want to store Apache Ant:


For example: C:\apache-ant-1.9.5




4. Add ANT_HOME:


Add ANT_HOME as the Windows environment variable, and point it to your Ant folder.








5. Update Path:


Update Path variable, append %ANT_HOME%\bin at the end, so that you can run the Ant’s command everywhere.





6. Verification:


Go to Command Prompt, type ant -version and hit Enter key.

C:\Users\Dell5>ant -version
Apache Ant(TM) version 1.9.5 compiled on June 20 2015
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed


If you see a similar message above, means the Apache Ant is installed successfully on Windows.

Reference: Installing Apache Ant

How to install JDK on Windows


There are few simple steps in downloading JDK and installing it.

1. Go to Oracle website:




2. Mouse hover on Downloads menu, under 'Popular Downloads' section click on 'Java for Developers'




3. Click on Java Platform (JDK) 8u45





4. You will be directed to 'Java SE Development Kit 8 Downloads' page





5. Click on 'Accept License Agreement' radio button



6. Based on your system architecture click on Windows x86 or Windows x64

x86 is for 32bit and x64 is for 64bit operating system


7. In my case I'm downloading Windows x64





8. Once download finish, double click on installer



9. JDK installation wizard will be opened. Click on Next to follow screen instruction and complete installation











10. Click on Close


11. Java installation completed. Hurray!!!



12. To verify if java is installed properly, open Command Prompt





13. Type command 'Java -version'



14.  Hit Enter key



 15. Java version will be shown in Command Prompt