ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Croquette <>
Subject Depedency to tools.jar
Date Wed, 11 Jun 2014 07:36:07 GMT

when using Ant with a JRE (instead of the JDK), the following message appears:

Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar

It comes from getToolsJar() in "ant/src/main/org/apache/tools/ant/launch/", which
is called independently of the real need for the classes provided by tools.jar. They seem
to be used only when building a Java application (see details below). However, Ant is also
used for non Java builds, for instance DITA uses Ant, and seems to work just fine with a JRE.
The only inconvenience is the message that appears in the logs.

It would be great to get rid of the message in this case. What do you think ? Shall I open
a bug report ?

Here are the references to the classes contained in tools.jar, for the record:

ant/build.xml:        <available classname=""/>
ant/build.xml:        <available classname=""/>
ant/manual/Tasks/javadoc.html:              <code></code></a>)</td>
ant/manual/Tasks/javadoc.html:you maybe get a <tt>java.lang.ClassCastException:</tt>.
ant/src/etc/testcases/taskdefs/rmic/rmic.xml:    <available property="rmic.present" classname="sun.rmi.rmic.Main"/>
ant/src/main/org/apache/tools/ant/launch/                Class.forName("");
ant/src/main/org/apache/tools/ant/launch/            Class.forName("");
ant/src/main/org/apache/tools/ant/taskdefs/compilers/    public static
final String APT_ENTRY_POINT = "";
ant/src/main/org/apache/tools/ant/taskdefs/compilers/    private
static final String MODERN_COMPILER = "";
ant/src/main/org/apache/tools/ant/taskdefs/compilers/    protected static final
ant/src/main/org/apache/tools/ant/taskdefs/compilers/            Class c = Class.forName
ant/src/main/org/apache/tools/ant/taskdefs/optional/javah/                c
= Class.forName("");
ant/src/main/org/apache/tools/ant/taskdefs/optional/javah/                c
= Class.forName("");
ant/src/main/org/apache/tools/ant/taskdefs/optional/javah/ * Adapter to
ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/        args[j++] = "";
                                     + "");
        Class n2aMain = Class.forName("");
ant/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/ * Adapter
ant/src/main/org/apache/tools/ant/taskdefs/rmic/    public static final String
RMIC_CLASSNAME = "sun.rmi.rmic.Main";


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

View raw message