Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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

Problems with Ant

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • 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: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
  • 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
  • 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: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
  • 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. )
 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic