Mark Wielaard wrote:
Note, that I already agree we should change to use the context classloader (and the application classloader as backup if loading through the context classloader fails and it isn't the same as the application classloader). I just didn't make time to implement it.
I should have read your bug entry and letter more carefully on this.
I don't think we should use the application classloader as backup in every case. Remember, the application class loader may not be available or working at this phase in the booting process -- and it won't be if someone is actually using Classpath's defaultSystemClassLoader!
What I propose is this:
Try to use the context class loader.
As a backup, make it legal for VMClassLoader.getSystemClassLoader() to return null if the system class loader is not yet available at this point in the boot sequence. If it returns null, then that should be OK -- we just call Class.forName with "null" as the class loader, meaning to use the bootstrap classloader.
Please post a patch to classpath-patches if you have one. (Don't forget to update the documentation.)
Thanks, I'll be glad to do this, if we have consensus on the implementation.
--Steve Augart
_______________________________________________ Classpath mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath

