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 9287] New: - Java Environment fo AIX is not picked properly for JDK1.2
Date Tue, 21 May 2002 14:17:58 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=9287>.
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=9287

Java Environment fo AIX is not picked properly for JDK1.2

           Summary: Java Environment fo AIX is not picked properly for
                    JDK1.2
           Product: Ant
           Version: 1.4.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: kollakesav@hotmail.com


I try to create javadoc from AIX and ant build failed with message 
com.sun.tools.javadoc.Main is not found though the tools.jar is in proper 
classpath.  JavaEnvUtils is picking up the wrong path for javadoc exe.  

The code

org.apache.tools.ant.util.JavaEnvUtils.java

first gets the javadoc.exe from bin directory and then skips the check for 
AIX.  I would think first check for AIX path if not found check in the bin 
directory.

Currently the code is like this

        File jExecutable = findInDir(javaHome + "/bin", command);

        if (jExecutable == null && isAix) {
            // On IBM's JDK 1.2 the directory layout is different, 1.3 follows
            // Sun's layout.
            jExecutable = findInDir(javaHome + "/sh", command);
        }

I think the checking order should be reverse.  First check for AIX JDK1.2 
should be made if exe is not found in sh directory then look for bin 
directory.  Otherwise if the os is AIX and java version starts with 1.2 
overwrite the bin folder with sh folder.

if(System.getProperty("java.version").startsWith(JAVA_1_2) && isAix)
{
    jExecutable = findInDir(javaHome + "/sh", command);
}

--
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