diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java index 710d5ac1e..186ddc3d7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java @@ -414,7 +414,7 @@ public class Javac extends MatchingTask { classpath.setLocation(destDir); } - // Compine the build classpath with the system classpath, in an + // Combine the build classpath with the system classpath, in an // order determined by the value of build.classpath if (compileClasspath == null) { diff --git a/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/src/main/org/apache/tools/ant/taskdefs/Rmic.java index e5cdc90e3..75b6cf47d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -357,15 +357,14 @@ public class Rmic extends MatchingTask { // untouched classes are on classpath Path classpath = new Path(project, baseFile.getAbsolutePath()); - // add our classpath to the mix - - if (compileClasspath != null) { - classpath.addExisting(compileClasspath); + // Combine the build classpath with the system classpath, in an + // order determined by the value of build.classpath + if (compileClasspath == null) { + classpath.addExisting(Path.systemClasspath); + } else { + classpath.addExisting(compileClasspath.concatSystemClasspath()); } - // add the system classpath - classpath.addExisting(Path.systemClasspath); - // in jdk 1.2, the system classes are not on the visible classpath. if (Project.getJavaVersion().startsWith("1.2")) { String bootcp = System.getProperty("sun.boot.class.path");