Browse Source

Made AntClassLoader always add java.* and javax.* to the list of

packages to load via the system classloaders.

This fixes the problem reported by Erik Meade <emeade@geekfarm.org>.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268074 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
30385849b7
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      src/main/org/apache/tools/ant/AntClassLoader.java

+ 4
- 5
src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -110,11 +110,10 @@ public class AntClassLoader extends ClassLoader {
public AntClassLoader(Project project, Path classpath) { public AntClassLoader(Project project, Path classpath) {
this.project = project; this.project = project;
this.classpath = classpath; this.classpath = classpath;
if (project.getJavaVersion().startsWith("1.1")) {
// JDK > 1.1 adds these by default
addSystemPackageRoot("java");
addSystemPackageRoot("javax");
}

// JDK > 1.1 should add these by default, but some VMs don't
addSystemPackageRoot("java");
addSystemPackageRoot("javax");
} }


/** /**


Loading…
Cancel
Save