Hi, On Sat, 2004-03-13 at 10:30, Patrik Reali wrote: > In fact, I assume that only a JVM written in Java is able to use this class > for the bootstrap of the VM. (Correct me if wrong)
Yes for bootstrap. But it is meant as Application/SystemClassloader [*] which gets invoked to load the actual program as soon as the rest of the VM is bootstraped. If used then the thing a VM would do is parse the command line arguments to set java.class.path correctly and get the main class to start up. Then it would just call getSystemClassLoader() on java.lang.ClassLoader which returns an instance of gnu.java.lang.SystemClassLoader on which it can then call loadClass() for the main (application) class and invoke the main() method of that class. At least that is the theory. And if our SystemClassLoader actually extended URLClassLoader and our example VMClassLoader would set the given ProtectionDomain on the resulting Class instance (and the pd ProtectionDomain of Class was package private, not protected) then the VM would get lots things working nicely without to much work. (In theory...) Cheers, Mark [*] Or Classpath API documentation does explain the difference btw. http://www.klomp.org/mark/classpath/doc/api/html/java/lang/ClassLoader.html
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/classpath