A class is defined by it's name and it's classloader, not just it's name. So if you want to extend something loaded by specific classloader, the extended class also has to be loaded by that same classloader or it's parent classloaders. That is, by a classloader in the same classloader tree. Since your classloader is the root of it's own classloader tree, it doesn't have access to any of the other classes that might be available in your JVM, so you can't extend those classes with classes loaded by your classloader.
A URLClassLoader is really designed for loading wholly encapsulated sets of classes. That could be a collection of classes, or more likely, a JAR file. It's not designed for loading stuff into your existing JVM environment. I can't say with absolute confidence that that's 100% right, but it's generally right. Classloading (along with much of the JVM's internals) is friggin voodoo. cheers, barneyb On 12/15/05, Gareth Edwards <[EMAIL PROTECTED]> wrote: > I'm having some troubles using this java class to load some custom java > classes. I think it works find until you want to extend something in the > custom class. (Not sure). > > Any help would be much appreciated. > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
