Reputation: 21
I have tried the 8.3 format, I have tried everything and I can't get it ant to work. Any advice?
Thanks in advance
Upvotes: 2
Views: 22207
Reputation: 10377
C:\> set
, C:\>java -version
?@ echo off
set ANT_ARGS=-lib C:\ant\extralibs
set ANT_HOME=C:\ant
set ANT_OPTS=-Xmx1024m
set JAVA_HOME=C:\JDK\1.6.0_24
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%;C:\cvsnt
: DEFAULT
call ant -f %1
: DEBUG
:call ant -debug -f %1
: XML LOGGER
:call ant -logger org.apache.tools.ant.XmlLogger -f %1
: Performance Monitoring
:call ant -listener ise.antelope.common.AntPerformanceListener -f %1
: Mail Logger
:call ant -logger org.apache.tools.ant.listener.MailLogger -DMailLogger.malhost=... -DMailLogger.from=BuildServer -DMailLogger.failure.to=... DMailLogger.success.to=... -f %1
pause
Some advantages of starting ant like that :
Upvotes: 0
Reputation: 1
I had the same problem, all variables configured but the "ant" command won't work. When printing the path (with echo %path%) , I had this result :
;C:\Program Files\jdk1.6.0.31\bin;%ANT_HOME%\bin;
Then I restarted the computer, and somehow this validated the ANT_HOME variable, so now it is working.
Upvotes: 0
Reputation: 31
I just got to know that there should not be any space between the semicolon and the path we specify. I have been breaking my head how the hell does this happen despite making sure everything is right, let me illustrate this in better way:
ant_home=A:\apache-ant-1.8.2
path=someotherpath1;someotherpath2;A:\apache-ant-1.8.2\bin
Make sure there is no space between the semi colon and the path name.
And we think machines are perfect!!. This sounds stupid I know but it worked for me.
Cheers!!!
Upvotes: 3
Reputation: 62
Can run this command and put the output here?
echo %PATH%
Seems that Windows is not taking the right path and it's impossible for him to find the ant executable.
Upvotes: 2