This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: define-simple-class and jars on the classpath?
On Sun, Aug 27, 2006 at 10:28:39AM -0700, Per Bothner wrote:
> Try an explicit
> Class.forName("org.apache.tools.ant.Task")
> and see if that works.
Yep, this works:
import java.lang.*;
import org.apache.tools.ant.Task;
public class AntTest extends Task {
public static void main(String []args) throws ClassNotFoundException {
AntTest a = new AntTest();
System.out.println("Test run: " + Class.forName("org.apache.tools.ant.Task") + "\n");
}
}
> Maybe it's using the boot class laoder, rather than the system
> class loader. (I'm not a ClassLoader expert!) You can try
> getParent() on the ClassLoader returned by etClass().getClassLoader()
> to check that.
Assuming we're talking about gnu.bytecode.ObjectType that gives:
Classloader = sun.misc.Launcher$ExtClassLoader@a9c85c
Classloader parent = null
Cheers,
Steve