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,
=================================<br /> Rafael U. C. Afonso<br /> <a href="http://www.javafree.com.br" target="_blank" rel="nofollow">www.javafree.com.br</a><br />=================================<br /><i>Where is debug?<br />debug is on the table</i>
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.
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 ]
=================================<br /> Rafael U. C. Afonso<br /> <a href="http://www.javafree.com.br" target="_blank" rel="nofollow">www.javafree.com.br</a><br />=================================<br /><i>Where is debug?<br />debug is on the table</i>
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