ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Surry <Patrick.Su...@quadstone.com>
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
/home/ruby6/dh/QuadstoneSystem5.0C/server/jre/solaris/1.4.2_03/lib/tools.jar
...

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/Locator.java's getToolsJar() function:

     if (!toolsJar.exists()) {
//PDS changed message
         System.out.println(
"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.

Regards,
Patrick

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


Mime
View raw message