getClassLoader()
Vijay Saraswat
vj at research.att.com
Mon Jul 27 21:15:33 PDT 1998
Resent-From: kaffe at rufus.w3.org
Date: Mon, 27 Jul 1998 21:08:44 -0700 (PDT)
Sender: owner-kaffe at rufus.w3.org
The method Class.getClassLoader() is returning null, which is
causing stuff to bomb out with NullPointerException. Eg:
class Bar {
public static void main(String[] args) {
Integer x = new Integer(1);
System.out.println("Class loader = " + x.getClass().getClassLoader());
}
}
$ kaffe Bar
Class loader = null
This is a bug, right? I'm not super familiar with this method.
No. An implementation is allowed to return null for classes
loaded from the so-called "system loader".
See http://java.sun.com/people/gbracha/classloaders.ps.
More information about the kaffe
mailing list