• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Help getting Ant installed and to run

 
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 ]
 
Saloon Keeper
Posts: 22484
151
Android Eclipse IDE Tomcat Server Redhat Java 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
    Bookmark Topic Watch Topic
  • New Topic