How do you install Apache Ant? trouble setting ANT_HOME

I downloaded apache ant from the website. I unzipped the file to my desktop and attempted to add and set the environment variable ANT_HOME. I created a variable name: ANT_HOME and set the variable value: C:\Users\Administrator\Desktop\apache\apache-ant-1.8.2\bin then I run ant -version in the cmd window but it says 'ant' is not recognized as an internal or external command,
operable program or batch file. Am I pointing it to the wrong file or how should the ANT_HOME value be set? Is there anything I need to do besides that when trying to install and setup apache? There's no .exe file to open and run.
anshealthAsked:
Who is Participating?
 
yjchong514Connect With a Mentor Commented:
Edit your PATH environment variable to include Ant's "bin" directory. The exact steps for editing your path with depend on your operating system, but for example on XP:

Bring up Explorer (Windows-E)
Right-click on "My Computer" and select "Properties"
On the "Advanced" tab, click on "Environment Variables"
If the set of "user variables" already contains a PATH entry, edit that. Otherwise create a new entry. (If you want it to affect all users, set it as a system environment variable.)
Add the Ant bin directory without any quotes. Use a semi-colon to separate it from another entry. For example, you might have:

c:\Program Files\Utils;c:\Program Files\Ant 1.7\bin Start a new Command Prompt to see the changes (they won't affect existing windows)

NOTE:
1. Always remember, don't put a SPACE after each semicolon.
--------------------------------------------------------------------------------
Good:
C:\Turtle;C:\ant

Bad:
C:\Turtle; C:\ant

0
 
anshealthAuthor Commented:
That worked but now I get the following error when I type ant -version in DOS:

Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar

so I did echo on JAVA_HOME, ANT_HOME, and PATH it returned:

C:\Users\Administrator>echo %JAVA_HOME%
C:\jdk-1_5_0_17-windows-i586-p

C:\Users\Administrator>echo %ANT_HOME%
C:\Users\Administrator\Desktop\apache\apache-ant-1.8.2

C:\Users\Administrator>echo %PATH%
C:\Users\Administrator\Desktop\apache\apache-ant-1.8.2\bin ... plus other stuff...

I'm working on Windows Server 2008 Standard

0
 
yjchong514Commented:
Since you are working in windows, why not try this to MAKE LIFE EASY
http://code.google.com/p/winant/

IT automates ALL setup process in WINDOWS.

Time to collect points, I guess. :-)
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
yjchong514Commented:
If you still insist to prefer traditional way, go for:
http://javawithbrain.blogspot.com/2010/12/installing-apache-ant.html

GOOD LUCK!

0
 
anshealthAuthor Commented:
Thank you!
0
 
yjchong514Commented:
Problem:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar

Solution:
You need to installed the JDK (Java Development  Kit) and set JAVA_HOME.
I think you only have Java Runtime on that machine.
0
 
yjchong514Commented:
Ooh! You solved the problem, then it 's good to hear that.

Happy working and Happy weekend!

Bye.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.