dcsimg
Problem running Ant using a batch file to set environment variables
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Brian_Gooding
Posted On:   Wednesday, September 18, 2002 09:31 AM

I have just installed Ant on a Windows 2000 box and when run, Ant correctly complains that it can't find build.xml (because I haven't defined it yet). This is as expected as long as I run from a command prompt after setting up the environment variables ANT_HOME,JAVA_HOME and PATH. If the environment variables are set up by calling a batch file from the command prompt & then calling Ant, then Ant gives the error message:- "The filename, directory name, or volume label syntax is incorrect." The same thing happens if the call to Ant is included in the batch file. I initially thought this must be problems with long file nam   More>>


I have just installed Ant on a Windows 2000 box and when run, Ant correctly complains
that it can't find build.xml (because I haven't defined it yet).


This is as expected as long as I run from a command prompt after
setting up the environment variables ANT_HOME,JAVA_HOME and PATH.


If the environment variables are set up by calling a batch file from
the command prompt & then calling Ant, then Ant gives the error message:-

"The filename, directory name, or volume label syntax is incorrect."

The same thing happens if the call to Ant is included in the batch file.

I initially thought this must be problems with long file names, similar to those
with Ant on Windows 95 or 98, but it still occurs using short file names.

Here is an example of a batch file:-


			
Rem Run the Ant build process
set ANT_HOME=c:Ant
set JAVA_HOME= c:JBuilder6jdk1.3.1
set PATH=%ANT_HOME% in
ant


Any ideas ?

   <<Less

Re: Problem running Ant using a batch file to set environment variables

Posted By:   Erik_Hatcher  
Posted On:   Wednesday, September 18, 2002 05:57 PM

What happens if you set up the environment variables system-wide, then run "ant" from the command-line? Same effect? Try turning on echo in the ant.bat in ANT_HOME/lib and seeing whats causing the problem in more detail.
About | Sitemap | Contact