classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More ClassLoader problems


From: David Holmes
Subject: More ClassLoader problems
Date: Tue, 16 Mar 2004 10:17:31 +1000

There seems to be some general confusion, concerning the bootstrap
classloader, which is often represented as null, and the "system" or
application classloader - as returned by ClassLoader.getSystemClassLoader -
which is never null.  For example, the class docs for java.lang.Class
states:

"Arrays with identical type and number of dimensions share the same class
(and null "system" ClassLoader, incidentally)."

First the system classloader is not null.

Second, arrays have the same classloader as their element type which is null
only if the element type is a primitive of itself loaded by the bootstrap
loader.

Then in the docs for Class.getClassLoader() it again incorrectly states
  "If it was loaded by the system classloader this method will return null".

"system" should be "bootstrap".

Cheers,
David Holmes






reply via email to

[Prev in Thread] Current Thread [Next in Thread]