ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Surry <>
Subject Make the tools.jar warning less alarming?
Date Tue, 30 Nov 2004 20:29:08 GMT
This has likely come up before, but if you run Ant with a JRE instead of a JDK, 
you get an alarming message like this:

Unable to locate tools.jar. Expected to find it in

But for my application, I don't need any of the java compilation tasks and Ant 
works just fine with a JRE and my custom tasks, so I suggest changing the 
message to something like below, which isn't so worrisome and gives you a clue 
as to what to do if it really is a problem:

Note: java compilation tasks unavailable - if needed, provide JDK tools.jar
via CLASSPATH, -lib or in D:\QS50C\server\jre\win32\1.4.2_03\lib

This is just a change to the println in 
org/apache/tools/ant/launch/'s getToolsJar() function:

     if (!toolsJar.exists()) {
//PDS changed message
"Note: java compilation tasks unavailable - if needed, provide JDK tools.jar\n" +
"via CLASSPATH, -lib or in " + toolsJar.getParentFile().getPath());
//PDS end
         return null;

Anyway, I'm not a developer and don't have CVS access, but thought someone 
might agree this was a good idea and want to pick it up.


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

View raw message