Install Ant in windows

This example show you how to install apache ant in windows
Apache Ant is a Java-based build tool.

1. System Requirement

Please take note that Ant require Java JDK to run. A simple way to check java version installed in windows is to issue command Windows Key + R , type cmd to start a Command prompt. Type :   java -version and hit enter in the Command Prompt

check_java_version

2. Ant also require JAVA_HOME variable to be define in Windows Environment Variable. (Right click “My Computer” -> “Properties”).

windows_environment_variable

In most case, Java is installed in C:\Program Files\Java\…., choose the one with jdk. Example : C:\Program Files\Java\jrockit-jdk1.6.0_33-R28.2.4-4.1.0\ ,

Other example : C:\Program Files\Java\jdk1.6.0_13

java_path

Click “New” to create a new System Variable “JAVA_HOME”.

java_path_variable

 

3. Download ant from http://ant.apache.org/bindownload.cgi
Most of the time you only require the binary. So you can just click on the link for binary. (approximate 7~8Mb file size)

download_ant

4. Unzip/Extract the zip file into c:\ant
unzip_ant

5. Add ANT_HOME to Windows Environment Variable. (Right click “My Computer” -> “Properties”)
ant_home_env

6. Add %ANT_HOME%\bin to PATH variable.

(By doing this, you may then invoke command inside bin globally.)
ant_home_bin_env

7. Verification

Issue “ant -version” in Command Prompt to verify. You should be getting something like this.

ant_version

That it for install Apache Ant in Windows. Thank you for reading

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">