If you use a class loader to load a java class, does that class now live in the ColdFusion memory space the way a class would if it's path was set in the ColdFusion admin.... if you use class loader, does it incur large overhead everytime you load that javaclass? Or just the first time, the rest being like built in java classes?
Am I making any sense? ...................... Ben Nadel Web Developer Nylon Technology 6 West 14th Street New York, NY 10011 212.691.1134 212.691.3477 fax www.nylontechnology.com "Vote for Pedro" -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert Sent: Thursday, December 15, 2005 8:00 PM To: [email protected] Subject: Re: [CFCDev] Anyone using java.net.URLClassLoader? 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] ---------------------------------------------------------- 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]
