Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ANT installation problem......

 
darren schild
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is from the get go on the "build".
I run the command: build -Ddist.dir=<c:\ant> dist
An "access is denied" message is all I get.
The permissions are all good as I am the object owner.
I am using Window$2000.
Anyone have a similiar situation? I am up for ANY suggestions? My main goal is to get JAMES a runnin
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you supply some more details on you environment?
Where is ant installed?
Where are you running the "ant" command from?
Where is your build.xml file?
Also, why are you passing dist.dir on the command line rather than placing it in build.xml?
 
darren schild
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant is installed in c:\apache\ant.
The command is run from a cmd prompt.
I have a build file in c:\apache\ant at the moment it was in c:\apache.
I am passing the dist.dir per the install documentation for ant.
Do you know any good sights to learn more about ant? Maybe a good book or two?
Thanks for the reply!
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darren -
I'll let you know how I use ant - maybe that will help.
First, c:\apache\ant is a good place to have ant installed. Now, add c:\apache\ant\bin to your path. This will allow you to run ant from anywhere.
Next, I have a projects folder in c:\java\projects\. Each project gets a folder, and in that folder an ant file. So:
c:\java\projects\demo
contains:
c:\java\projects\demo\build.xml
c:\java\projects\demo\demo.java
I cd to c:\java\projects\demo, and execute the ant command, all by itself.
I set all the properties right in the ant file, rather than passing them on the command line.
Hope that helps!
 
Erik Hatcher
Author
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good answers already given for this issue. As for books on Ant, please give our book a try (see my signature for details).
Please post back if you still have issues with getting Ant to run.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic