This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: null ClassLoader
> This has been discussed before...
Yes, but it hasn't been implemented. Why ? Such a small thing.
> Do you know of any VM that doesn't print "null" with:
No, I'll have to correct myself.
> public class T {
> public static void main(String[] args) {
> System.out.println(Object.class.getClassLoader());
> }
> }
But this is not a very relevant question. Anything in the java*
namespace is loaded by the bootstrap loader. It says that in the spec.
But try the more interesting:
public class T {
public static void main(String[] args) {
System.out.println(T.class.getClassLoader());
}
}
I only found an old 1.1 jdk that returned null on that. All newer
(1.2/3/4) sun and ibm jdk's return a value.
Torsten