See my earlier email from today. You have to recursively invoke ant using the <exec> tag and set whatever environment variables you want using the <env> tags in your <exec>.
Mike > -----Original Message----- > From: Gordon Rose [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 22, 2002 9:22 AM > To: [EMAIL PROTECTED] > Subject: Setting Java_Home? > > > Hi, > > I'm using IBM's WSAD and Ant. In my build of a "Hello World" > app, I got the error message that: > BuildException: C:\Workspace\HelloWorldProject\build.xml:11: > Cannot use classic compiler, as it is not available A common > solution is to set the environment variable JAVA_HOME to your > jdk directory.. > > I've understood that you need to use IBM's compiler for any > WSAD work. So, I'd like to temporarily set the JAVA_HOME > variable to IBM's JDK. That's easy enough using an > environment variables script or by modifying the variable for > the entire system. However, to keep things clean, I'd like to > do this from within Ant. Does Ant convert the OS variable > JAVA_HOME to an internal Ant property that I could override > by defining the property in a build.xml or properties file? > Again, my reason for this approach is a) leaving my system's > Java_Home @ the standard Sun JDK and b) avoiding scripts, > etc. that make moving/modifying the configuration messy. Thanks much, > > Gordon > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>