Sunday, September 5, 2010

Installing ant

First, Please make sure you have the Latest jdk. Currently java1.6 with update 21 would be required.
Now download ant from http://ant.apache.org/
The binary edition of Ant is shipped with 3 different compression formats:

1. .zip - Recommended compression format for Windows, can also be used on other platforms. Supported by many programs and some operating systems natively.
2. .tar.gz - Uses the tar program to gather files together, and gzip to compress and uncompress.
3. .tar.bz2 - Uses the tar program to gather files together, and bzip2 to compress and uncompress..

Choose the format that is best supported for your platform.
Next step would be to extract the folder and place in the directory.
Set environmental variables JAVA_HOME to your Java environment, ANT_HOME to the directory you uncompressed Ant to, and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to your PATH.

Setting up environment Variables.
From the Start Menu, select Start > Settings > Control Panel.
Double-click System to open the System Properties window.
On the Advanced tab, select environmental variables .
Modify each environmental or system variable.
Set the PATH environment variable to include the directory where you installed the Ant bin directory:

1. Find the PATH environment variable in the list. If PATH is not listed, click on New under the System variables section.
2. Type %ANT_HOME%\bin;%JAVA_HOME%\bin;
Important: If there are other variables listed, create a new variable separated by a semicolon. Ensure there are no spaces before or after the semicolon.

Set the ANT_HOME environment variable to the directory where you installed Ant:

1. Click on New under the System variables section.
2. Type ANT_HOME in the variable name field.
3. Type the location where you extracted your ant in the variable value field.

Set the JAVA_HOME environment variable to the directory where you installed the J2SE SDK application:

1. Click on New under the System variables section.
2. Type JAVA_HOME in the variable name field.
3. Type C:\j2sdk1.4.2_13 in the variable value field.

Done!
You've just installed ant. To check, open command prompt and type ant -version.
If it shows you the version of ant you installed, everything went on fine.
Congrats.

No comments:

Post a Comment