I\'m trying to use ant in a vista 64 environment to build some docbook/xml files.
However, I can\'t resolve this error message. Anybody have suggestions?
C:\\U
why don't you try the 32 bit version. there could be a problem between the two versions you have installed being 32 and 64. try the 32 bit version so ur not seeing any 64 bit versions.
it should fix ur problem.
I was getting a "C:\Program" is not recognized as an internal or external command, operable program or batch file error, when running %ANT_HOME%\bin\ant.bat
I found that I needed to wrap the command in double-quotes in order to get the proper escaping to happen on the path string.
FIX: "%ANT_HOME%\bin\ant.bat" --NOT-- %ANT_HOME%\bin\ant.bat
Hope that helps!
I had this problem on a 64-bit Windows 7 machine and Ant 1.8.2. The solution was to use the admin tools mentioned by #bigfix to set the environment variables. Follow the Ant installation instructions for Windows. But do not set the path as %ANT_HOME%\bin. Instead, use an explicit path such as C:\jdk-1.5.0.05\bin.
My first test failed because my command window was already open and using the old env vars. Close it and open a new one. Then try the test. It worked for me.
I solved the problem by creating system variable JAVA_HOME to C:\Program Files\Java\jdk1.6.0_25. Don't put the semi colon after it. First of all I put the semi colon and there was an error. I removed the semi colon and it worked.
I am going to add one other issue that I had with this.
BTW, the answer here worked for me too. I had to point my java directory to the specific SDK version. Thank you very much.
But I'm going to add that I had to install the SDK as an administrator, or it didn't extract tools.jar. I found this answer elsewhere, and I hope it helps someone to repeat it here.
All you need is to set JAVA_HOME path in your environment. In Windows 7 go to "System Properties -> Advanced -> Environment Variables" and add JAVA_HOME. The value in my case was:
C:\Program Files\Java\jdk1.7.0_07
This resolved the issue for me. This variable points Ant to the correct Java location.