ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian FitzGerald <>
Subject Ant not respecting JAVA_HOME
Date Mon, 22 Aug 2011 09:36:48 GMT
I have set JAVA_HOME and ANT_HOME environment variables as well as adding
%JAVA_HOME%\bin and %ANT_HOME\bin to the PATH environment variable.

When I echo JAVA_HOME, I get the value I expect:
C:\Program Files\Java\jdk.1.6.0_23

When I echo ANT_HOME I get the value I expect:
C:\Program Files\Apache Software Foundation\apache-ant-1.8.2\bin

However when I run Ant, I get:
Unable to locate tools.jar (because it is looking in C:\Program Files\Java\*
Buildfile: build.xml does not exist!
Build failed

So even though JAVA_HOME appears to be set correctly as an environment
variable, Ant is still looking at the jre rather than the jdk.  So it seems
as if my JAVA_HOME is being overwriten or Ant is ignoring it.  Any thoughts
how I can fix this?


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