On Thursday 05 January 2006 23:37, Berin Loritsch wrote: > I don't recall if we tested extending where the > URLStreamHandlers are located using the "|java.protocol.handler.pkgs" > system property.
The general problem with the java.protocol.handler.pkgs is revolving around an obscure bug (which Sun will not fix) which gives the side effect that those protocol handlers MUST sit in system classloader (or higher), and that is somewhat troublesome for products like Cocoon. IMHO, a big pity, since one could have done so much funky stuff with URL handlers otherwise. The interesting thing around this is that the internal code that handles this probably been refactored so that an additional method call is introduced on the call stack. Reason, it looks at the callstack a couple of levels away and tries to determine the "callee" and use its classloader. But it is always seeing java.net.URL which classloader is null, so it calls ClassLoader.getSystemClassLoader(). I have been arguing over this since JDK1.2 came out, but "Won't fix." is the categorical reply from Sun. Cheers Niclas