ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Brown" <>
Subject Re: Problem with setting JAVA_HOME for Ant
Date Tue, 08 Apr 2008 22:31:44 GMT
Hello, I have found the best thing to do with Windows is define JAVA_HOME in: My Computer/System
Properties dialog. Click the Advance Tab Pane and click the button: Environment Variables.
Don't do this as Administrator but just as the user you are when you are running Ant at the
command-line. HTH

Eric Chamberlain wrote ..
> I have a real mystery and cannot find the solution anywhere I have looked
> (including the Ant FAQ).
> Summary:   When I run Ant, it looks somewhere other than JAVA_HOME for the
> java directory.
> I am running Ant on Windows XP to execute a NetBeans-generated build.xml.
> One step I have tried has been to run 
>    ant -diagnostics
> Which confirms that java.home is located somewhere other than JAVA_HOME (not
> even in the same directory tree).
> Here is my question:   How can I change the value of java.home for ant?
> What .properties file do I have create?   Why does ant ignore it if I type
>    ant -Djava.home=%JAVA_HOME% -f mybuildfile.xml
> I was expecting to override the java.home there but it didn't happen.
> I am left rather puzzled.
> Eric Chamberlain
> Software Engineer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message