Jeroen Frijters wrote:
> > The Sun API spec clearly states that Class.getClassLoader() may return
> > null, and in fact MUST return null for primitive type Class objects.
> > So why worry about obviously buggy software?
>
> Because most software is buggy? If something runs on the Sun VM and it
> doesn't run on my VM, do you think the user cares about who's bug it is?
Sun's VM returns null for the boot loader.. here's an example:
$ cat > xx.java
public class xx {
public static void main(String[] args) throws Exception {
System.out.println(Object.class.getClassLoader());
}
}
^D
$ javac xx.java && java xx
null
$ java -version
java version "1.4.2-p5"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2-p5-archie_18_nov_2003_16_43)
Java HotSpot(TM) Client VM (build 1.4.2-p5-archie_18_nov_2003_16_43, mixed mode)
Are there some cases where Sun's Class.getClassLoader() doesn't
return null but other VM's do?
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath