You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/03/07 20:07:41 UTC
DO NOT REPLY [Bug 27508] New: -
Unable to locate tools.jar. Expected to find it in...
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=27508>.
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=27508
Unable to locate tools.jar. Expected to find it in...
Summary: Unable to locate tools.jar. Expected to find it in...
Product: Ant
Version: 1.7Alpha (nightly)
Platform: All
OS/Version: Windows 9x
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: mylyane@agate.plala.or.jp
org.apache.tools.ant.launch.Locator#getToolsJar()
Windows は path が大文字にされてしまう場合があるので, 以下のコーディングだと不充分です。
// couldn't find compiler - try to find tools.jar
// based on java.home setting
String javaHome = System.getProperty("java.home");
if (javaHome.endsWith("jre")) {
--> ^^^^^^^^^^^^^^^^^^^^^^^^^^
javaHome = javaHome.substring(0, javaHome.length() - 4);
}
File toolsJar = new File(javaHome + "/lib/tools.jar");
if (!toolsJar.exists()) {
System.out.println("Unable to locate tools.jar. "
+ "Expected to find it in " + toolsJar.getPath());
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org