This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Help getting Ant installed and to run Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Help getting Ant installed and to run" Watch "Help getting Ant installed and to run" New topic
Author

Help getting Ant installed and to run

Davy Kelly
Ranch Hand

Joined: Jan 12, 2004
Posts: 384
Hi everyone,

I am going through the Agile Java book by Jeff Langr, and the book says to install Ant.

I have downloaded a zip file for my windows machine, and extracted the zip file to a directory called ant in C:
C:\ant
but it holds a directory that got downloaded called apache-ant-1.6.5:
C:\ant\apache-ant-1.6.5

I have appended my classpath to include C:\ant\apache-ant-1.6.5\lib\ant.jar;

then I appended my path with C:\ant\apache-ant-1.6.5\bin;

I then made a new variable and called it ANT_HOME and set the environment as C:\ant

But when I try to use ant, by typing at the command line:
C:\ant I get a:


how can I make the Ant see the tool.jar in the C:\Program Files\Java\jdk1.5.0_03\lib not the C:\Program Files\Java\jre1.5.0_04\lib\tools.jar

Davy
[ August 12, 2005: Message edited by: Davy Kelly ]

How simple does it have to be???
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16022
    
  20

Actually, ANT_HOME should be defined as the root directory of the unzipped Ant. That is, "C:\ant\apache-ant-1.6.5".

I don't know offhand if Ant uses the JAVA_HOME environment variable or not. A lot of Java apps do, but not all of them.


Customer surveys are for companies who didn't pay proper attention to begin with.
Davy Kelly
Ranch Hand

Joined: Jan 12, 2004
Posts: 384
sorry, I forgot to add in the apache-ant-1.6.5 as the ANT_HOME, in my above post.

I double checked and I do have this variable set to what you suggested, but it still not working.

davy
[ August 12, 2005: Message edited by: Davy Kelly ]
Davy Kelly
Ranch Hand

Joined: Jan 12, 2004
Posts: 384
I eventually done it, My JAVA_HOME was not pointing to anything.

Davy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help getting Ant installed and to run