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 28300] New: - tools.jar not found
Date Thu, 08 Apr 2004 20:51:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28300>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28300

tools.jar not found

           Summary: tools.jar not found
           Product: Ant
           Version: 1.6.1
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: senen_de_diego@hotmail.com


When running ant, it gives this error message:

Unable to locate tools.jar. Expected to find it in C:\JAVA\J2SDK1.4.1_01\JRE\lib
\tools.jar

Then the javac task fails because doesn't find a compiler.

I think the reason for this error is in class
org.apache.tools.ant.launch.Locator.java, at line 184 where it says:
---
if (javaHome.endsWith("jre")) {
   javaHome = javaHome.substring(0, javaHome.length() - 4);
}
---
that should be replace whit something like:
---
if (javaHome.toLowerCase().endsWith("jre") ) {....
---
because the value of javaHome, as returned by System.getProperty("java.home"), is "C:\JAVA\J2SDK1.4.1_01\JRE".
Uppercase!

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


Mime
View raw message