• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Ant installation directory

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going through the process of installing Ant as well and have some confusion about the directory to specify for the env variable value.  The documentation says to use the directory to which Ant was extracted as the variable value.  In my case, it's Downloads.

My first question is: should I have installed it in another location? Perhaps root?  There are only two accounts on my device: Admin and my personal user account (if that has any bearing on what I should do).

2: Should I use C:\Users\username\Downloads\ or drill down further into the directory?  This is more of a Windows path search algorithm question I suppose.  Will the Ant executable be found by ending the variable value at Downloads?

 
Saloon Keeper
Posts: 28316
207
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant is distributed as a single ZIP file. set environment variable ANT_HOME to point to the top-level directory of the unzipped files, make sure JAVA_HOME is set, add ANT_HOME\bin to your PATH and you should be all set.

Ant does not require special privileges, so it's common for people to simply unzip it into their home directories. On Unix-style OS's, a system-wide install of Ant might go into /usr/local. For Windows, it's less standardized, although the PROGRAM_FILES directory is common.

I wouldn't keep it in your Download directory though. I, at least, periodically clean that one out and not only is is the last place I'd look for my software, I'd probably accidentally "clean" it out.
 
Christian Antfeld
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Tim! It seems like I'm starting to get the hang of how things work with setting things up and can stop second guessing myself so much.  My experience here has been so much better than other forums with how much explicit and expedient help I've had.  Love what you're all doing.
 
Christian Antfeld
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After moving the unzipped Ant file to Program Files and running the ant -version command, C:\Program Files\apache-ant-1.10.8-bin\apache-ant-1.10.8>ant -version 'ant' is not recognized as an internal or external command, operable program or batch file. is returned. Is something wrong with my installation or am I running the wrong command to check which version I have?

I want to make sure the installation is sound and can be accessed and be used.  I don't want to get deeper into the tutorial and have to turn back all because Ant isn't working correctly.
 
Tim Holloway
Saloon Keeper
Posts: 28316
207
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to have this in your PATH settings:

"C:\Program Files\apache-ant-1.10.8-bin\apache-ant-1.10.8\bin"

And note the quotes. As always, not quoting a filename path which has spaces in it will confuse your command shell.
 
Rancher
Posts: 5035
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

the ant -version command, C:\Program Files\apache-ant-1.10.8-bin\apache-ant-1.10.8>ant -version


It looks like your location is one folder short of where the ant command is located.  I assume the ant command is in the bin folder.  Move to the bin folder and try again
C:\Program Files\apache-ant-1.10.8-bin\apache-ant-1.10.8\bin>ant -version
 
Maybe he went home and went to bed. And took this tiny ad with him:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic