Brian, you can try this as well
C:\Users\Brian>cd C:\AntTest C:\AntTest>set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23 C:\AntTest>set ANT_HOME=C:\Ant C:\AntTest>set path=%JAVA_HOME%\bin C:\AntTest>java -classpath "%ANT_HOME%\lib\ant-launcher.jar" -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher Thanks, From: Brian FitzGerald <bmfitzgera...@gmail.com> To: Ant Users List <user@ant.apache.org> Date: 08/22/2011 07:28 PM Subject: Re: Ant not respecting JAVA_HOME Thanks for the help guys... this is what I got: WITH QUOTES: C:\Users\Brian>cd C:\AntTest C:\AntTest>set JAVA_HOME="C:\Program Files\Java\jdk.1.6.0_23" C:\AntTest>set ANT_HOME="C:\Ant" C:\AntTest>%ANT_HOME%\bin\ant The syntax of the command is incorrect. WITHOUT QUOTES: C:\Users\Brian>cd C:\AntTest C:\AntTest>set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23 C:\AntTest>set ANT_HOME=C:\Ant C:\AntTest>%ANT_HOME%\bin\ant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li b\tools.jar Buildfile: C:\AntTest\build.xml hello: [echo] Hello, World BUILD SUCCESSFUL Total time: 0 seconds So with quotes it wouldn't run at all. Without quotes, it ran, but still is looking in the JRE directory. Is now a good time to start banging my head against the wall? Brian =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you