1. Use ${ant.core.lib} as it makes fewer assumptions about the layout of the 
Ant installation than ${ant.home}/lib/ant.jar.

2. Pass includeantruntime="false" in all cases to best control what goes into 
the classpath.
diff --git a/make/build.xml b/make/build.xml
--- a/make/build.xml
+++ b/make/build.xml
@@ -433,7 +433,7 @@
         <genstubs
             srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}"
             includes="${import.jdk.stub.files}"
-            fork="true" classpath="${build.toolclasses.dir}:${build.bootstrap.dir}/classes:${ant.home}/lib/ant.jar"
+            fork="true" classpath="${build.toolclasses.dir}:${build.bootstrap.dir}/classes:${ant.core.lib}"
         />
     </target>
 
@@ -611,7 +611,8 @@
                executable="${boot.java.home}/bin/javac"
                srcdir="${make.tools.dir}/CompileProperties"
                destdir="${build.toolclasses.dir}/"
-               classpath="${ant.home}/lib/ant.jar"/>
+               classpath="${ant.core.lib}"
+               includeantruntime="false"/>
         <taskdef name="pcompile"
                  classname="CompilePropertiesTask"
                  classpath="${build.toolclasses.dir}/"/>
@@ -625,7 +626,8 @@
                executable="${boot.java.home}/bin/javac"
                srcdir="${make.tools.dir}/GenStubs"
                destdir="${build.toolclasses.dir}/"
-               classpath="${build.bootstrap.dir}/classes:${ant.home}/lib/ant.jar"/>
+               classpath="${build.bootstrap.dir}/classes:${ant.core.lib}"
+               includeantruntime="false"/>
         <taskdef name="genstubs"
                  classname="GenStubs$$Ant"
                  classpath="${build.toolclasses.dir}/"/>

Reply via email to