From 126357c353aa710b0191daa51d70b41edfc7351e Mon Sep 17 00:00:00 2001 From: wisberg Date: Thu, 5 May 2005 06:11:38 +0000 Subject: [PATCH] Defining parent class loader b/c ant classes not visible in Ant 1.6.x default parent. --- .../org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java index 31ea9e833..40c6bb3c9 100644 --- a/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java +++ b/build/src/org/aspectj/internal/tools/ant/taskdefs/AntBuilder.java @@ -616,7 +616,9 @@ public class AntBuilder extends Builder { String url = null; try { url = "file:" + toolsJar.toString().replace('\\', '/'); - ClassLoader loader = new URLClassLoader(new URL[] {new URL(url)}); + URL[] cp = new URL[] {new URL(url)}; + ClassLoader parent = Task.class.getClassLoader(); + ClassLoader loader = new URLClassLoader(cp, parent); Class c = loader.loadClass(AJCTASK); task = c.newInstance(); Project project = javac.getProject(); -- 2.39.5