I had already done that. I have JAVA_HOME defined correctly defined as a user-level. I can see that JAVA_HOME is defined and defined correctly in the command prompt window in which I run ant. I just cannot get Ant to use it. Arrgh!
If it helps, this is what Ant says: c:\....\nbproject\build-impl.xml:337: The following error occurred while executing this line: c:\....\nbproject\build-impl.xml:168: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files\Java\jre1.5.0_06" This is not the correct location. The correct location is c:\VPTrunk\src\ext\jdk\bin which is the value of JAVA_HOME at the point I invoke ant. == Eric == -----Original Message----- From: David Brown [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 08, 2008 3:32 PM To: Ant Users List Subject: Re: Problem with setting JAVA_HOME for Ant 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
