classpath
[Top][All Lists]
Advanced

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

Re: URL protocol handler classloader


From: Mark Wielaard
Subject: Re: URL protocol handler classloader
Date: Sun, 16 Jan 2005 23:31:56 +0100

Hi,

On Sun, 2005-01-16 at 10:09 -0500, Steven Augart wrote:
> 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!

But if your default System class loader depends on URL protocol handlers
not provided by your bootstrap classloader you are in trouble anyway.
Since there is no other way to load those then. In practise this is
almost always just the "file:" protocol or some runtime specific one
(like "libgcj:" for native compiled gcj code).

> 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.

If at this point the system classloader is null then we are in trouble.
We set the context classloader to null during bootstrapping so we
already tried the bootstrap classloader to get the URL protocol handler.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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