Name: akC45999 Date: 05/20/98
The Java Virtual Machine Specification, 5.2 Virtual Machine Start-up reads:
The Java virtual machine starts up by creating an initial class, which is
specified in an implementation dependent manner, using the default class
loader (§5.3.1).
But the following test shows that the initial class
is loaded not by the default class loader.
----------------- file startup.java
public class startup {
public static void main(String args[]) {
ClassLoader cld=startup.class.getClassLoader();
if (cld==null) {
System.out.println("passed");
} else {
System.out.println("failed: loader="+cld);
}
}
}
-------------------------
Test execution:
novo64% java -version
java version "1.2beta4"
Classic VM (build JDK-1.2beta4-F, green threads, sunwjit)
novo64% javac startup.java
novo64% java startup
failed: loader=sun.misc.Launcher$AppClassLoader@13e4cf3f
novo64%
======================================================================