ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John W. Warner" <>
Subject RE: Ant 1.4.1: Using javac fork=true and changing java.home
Date Fri, 19 Apr 2002 16:41:49 GMT
I don't know if this will help you or not.
I had JWSDP ea2 which has ant 1.4.1 in it and I originally installed it
with the Sun JDK 1.3.1_02 and had stuff working fine. I changed to JDK
1.4.0 and I got this really weird error saying;
JAVA_HOME not set properly. 
Unable to execute command '-Dlog:Jakarta.apache.log...' 
So, I uninstalled JWSDP and re-installed it so that it would formally
recognize the 1.4.0 jdk. So now the whole thing works again. 

Anyway, the reason why I mention this is I wonder what would happen if
you tried the JWSDP letting it link to JDK 1.4.0 and then backward
calling your 1.3.1_03 JDK.. Kinda a reverse of what you're doing but in
this case letting JDK 1.4.0 have the upper hand.

Good luck on your issue,
- John 

-----Original Message-----
From: Gordon Tyler [] 
Sent: Thursday, April 18, 2002 06:17 PM
To: Ant User List
Subject: Ant 1.4.1: Using javac fork=true and changing java.home

Running Ant1.4.1 with JDK 1.3.1_03.

I'm trying to build parts of my project with JDK 1.3 and other parts
1.4. The 1.4 compilation targets look like this:

<target name="compile-java-1.4">
    <antcall target="compile-java-1.4-impl">
        <param name="java.home" value="${java14.home}"/>

<target name="compile-java-1.4-impl">
    <javac classpathref="alto.classpath"
        <include name="${alto.package}/client/**/*.java"/>
        <include name="${alto.package}/commonui/**/*.java"/>
        <include name="${alto.package}/nexus/**/*.java"/>
        <include name="${alto.package}/workstation/**/*.java"/>
        <exclude name="${alto.test.dir}/*.java"/>

However, it seems that <javac fork=true> doesn't use the java.home
to execute javac. It appears to execute whatever javac it finds on the
which happens to be JDK 1.3. Is it supposed to use java.home to find the
javac executable or am I misinterpreting the docs?


Sitraka -- the Java advantage

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

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

View raw message