X

Installing ANT on Windows

Guest Author

1. Download ANT

2. Unzip the zip file and put it in your comfortable folder (say D:/ant/)

3. Set ANT_HOME environment variable to the Ant location

(MyComputer Rt.Click >>  Properties >> Advanced >> Environment Variables >> User Variables for Administrator >> Set New Variable Name as "ANT_HOME" and set New Variable Value as D:/ant)

4. Now set Path variable to point to your ANT bin directory

(User Variables for Administrator >> Click on Path variable >> Append the ANT bin directory location , say %ANT_HOME%\\bin)

5. Open a command prompt and type "ant" , you should see it working now . In case of any failure try the below command and see the value for ANT_HOME

c:\\echo %ANT_HOME%          // This should print your current ANT directory


Join the discussion

Comments ( 3 )
  • Mason Simon Friday, August 3, 2007
    An easier way to install Ant on Windows is to use WinAnt - the Windows installer for Ant that I made. It sets the necessary environment variables for you, and can install the ant-contrib tasks too!
    -Mason
  • priya Monday, February 16, 2009

    this guide was quite helpful

    when i typed d:/ant in the command prompt it said ant is set incorrectly or ant could not be located

    but when i typed

    c:\\echo %ANT_HOME% it showed the current ant working directory as d:/ant which is right so does it mean ant is now installed correctly or does it require any more settings


  • priya Monday, February 16, 2009

    this guide was quite helpful

    when i typed d:/ant in the command prompt it said ant is set incorrectly or ant could not be located

    but when i typed

    c:\\echo %ANT_HOME% it showed the current ant working directory as d:/ant which is right so does it mean ant is now installed correctly or does it require any more settings


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.