ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7327] New: - ant javac ignores JAVA_HOME set
Date Thu, 21 Mar 2002 15:49:31 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7327>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7327

ant javac ignores JAVA_HOME set

           Summary: ant javac ignores JAVA_HOME set
           Product: Ant
           Version: 1.4.1
          Platform: Other
        OS/Version: Windows 9x
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: hintak_leung@yahoo.co.uk


sun jdk 1.3.1_02, installed under c:\jdk1.3.1_02 (default).
It comes with two java runtimes, one under "c:\jdk1.3.1_02\jre"
and another under "c:\program files\JavaSoft\JRE\1.3.1_02".

When called with just 
    set JAVA_HOME=c:\jdk1.3.1_02
    java -cp <...> org.apache.tools.ant.Main -debug
for a compilation task,
it keeps insisting that "java.home" is 
"c:\program files\JavaSoft\JRE\1.3.1_02".
While called with 
   c:\jdk1.3.1_02\bin\java -cp <...> org.apache.tools.ant.Main -debug
it insists that "java.home" is
"c:\jdk1.3.1_02\jre"
(note that I was calling the runtime as JDK_HOME\bin\java, 
not "JDK_HOME\jre\bin\java".

It seems that Ant is working out JAVA_HOME/java.home from the runtime
itself and ignoring the environment variable.

Same thing happens under cygwin with export JAVA_HOME.

The cure is as somebody else suggested in one of the previous
posts, make sure the classpath includes the real lib/tools.jar
under JDK_HOME.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message