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
I had this issue with Environment as :
I Was getting ant build message as "Unable to locate tools.jar. Expected to find it in E:\Java\jre6\lib\tools.jar
", where my JDK was installed at E:\Java\jdk1.6.0_33\
and JRE at E:\Java\jre6\
Cause:
My issue was that I have ANT_HOME
was set twice in the PATH system Environment variable at two different places (means some other variables in between).
Solution:
I removed the ANT_HOME
variable that pointed to the wrong location and everything worked fine with me.
I once faced the same problem of ant setup
. The promotion is just the same as
Unable to locate tools.jar`. Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar
Buildfile: build.xml does not exist! Build failed.
I deleted all jre path in %PATH%
environment and add jdk bin path. Finally I type %ANT_PATH%/bin
instead of %ANT_PATH%\bin
. It works.
May help.
you may be using the java in the C:\Windows\system32 directory rather then the installed JDK. I set a JAVA_HOME environmental variable and put %JAVA_HOME%\bin at the start of my path and the problems when away.
I got the same issue. Successfully resolved.
So if you do not see this variable it means that your variable was not set for the user that jenkins run under. You need to put "JAVA_HOME" in to the "system variables" section of environment variables, not "user variables".
restart jenkins after this and your problem must be fixed.
Thanks, this also works on Windows 8, x64, using Java x64.
I didn't want to add all that junk to my system settings so I created a batch file that I'd run just before I wanted to use the Android SDK. Here it is
set ANDROID_SDK_PT=C:\Program Files\eclipse\sdk\platform-tools
set ANDROID_SDK_TOOLS=C:\Program Files\eclipse\sdk\tools
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_25
set ANT_HOME=C:\apache-ant
set PATH=%PATH%;%ANDROID_SDK_PT%;%ANDROID_SDK_TOOLS%;%JAVA_HOME%;%ANT_HOME%\bin
I had the same problem because my JAVA_HOME path was set incorrectly (just like the OP's). It was set to the bin of the jdk.
So it was set to: C:\Program Files (x86)\Java\jdk1.6.0_25\bin
When it should have been set to: C:\Program Files (x86)\Java\jdk1.6.0_25
Updating this environmental variable fixed it for me.