Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help getting Ant installed and to run

 
Davy Kelly
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Davy Kelly
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I eventually done it, My JAVA_HOME was not pointing to anything.

Davy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic