- I am running Windows XP Professional Version 5.1 with service pack 3
- I have downloaded the JDK 1.6.0_24-b07 and have tested that it works
- I downloaded apache ant .zip and installed it to C:\ant
- I have set the path to ;%ANT_HOME%\bin
- I have set the user variable name to ANT_HOME
- I have set the user variable value to C:\ant\apache-ant-1.8.2
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
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 :
Then I restarted the computer, and somehow this validated the ANT_HOME variable, so now it is working.
C:\> set
,C:\>java -version
?if it works that way, f.e.
@ 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 :
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.
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!!!