ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santanu Basu <santanu.b...@tcs.com>
Subject Re: Ant not respecting JAVA_HOME
Date Mon, 22 Aug 2011 14:58:33 GMT
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 <bmfitzgerald3@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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message