• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems with Ant

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello:
I am using Ant 1.5.1 with Windos 98. In Autoexec I typed this:

But when I try run Ant in DOS prompt I got this message:


ANT_HOME is set incorrectly, or ant could not be located. Please set ANT_HOME


This is strange, because when I type "echo %ANT_HOME%" it prints the correct directory. Anyway, if ANT_HOME was not correctly set, I had not run ant.
Anyone can help me?
Thanks,
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is weird. Another proof that ANT_HOME is set correctly is that you use that variable in the PATH, and are able to run the program. The only thing I can suggest is when you run ant, you are executing ant.bat. You could go look at that file to see where the logic is failing. You can even throw in echo statements to see what the flow is, and to confirm you're actually calling that script in the first place.
 
Rafael Afonso
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greg:
I read ant.bat and I perceived that it waits that ANT_HOME must be "C:\ant". Well, I moved ANT from c:\java\jakarta-ant-1.5.1 to c:\ant and changed ANT_HOME. And it works! It is strange because I do not see anywhere that ANT must be in a particular directory.
Thanks,
[ March 20, 2003: Message edited by: Rafael Afonso ]
 
Greg Charles
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The ANT_HOME environment variable is supposed to be what makes it possible to put Ant in any directory. If ANT_HOME is not set at all, then the script looks for Ant in various places, including c:\ant. Still, I'm not sure what's happening on your system. You could try:
echo %ANT_HOME%
at the top of that script. With a few strategically placed echo statements, I bet you can figure out what's going on. (You might want to back up the original ant.bat before you start messing with it. )
 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic