What algorithm does your class loading use? Regards, Rodrigo
On Fri, Feb 22, 2008 at 2:40 AM, Mike Smoot <[EMAIL PROTECTED]> wrote: > Hi, > > I'm working on migrating an existing swing application ( > http://cytoscape.org) > to OSGi using Felix. With the help of bnd, I've gotten everything running > about how it should, with the exception of our legacy plugin mechanism. > The > way the old plugin mechanism works is that a plugin jar file (but not a > bundle) is read and we then call ClassLoader.loadClass() on a class found > in > the jar file. The problem is that with Felix I get a NoClassDefFoundError > when I try to load the class. I'm assuming this is because none of the > packages defined in the plugin jar are found by Felix since the plugin > jars > aren't bundles or loaded as such. > > Now, I've managed to work around this problem in two cases. First is > using > Equinox, which I'm not terribly keen on using. Second is by running bnd > on > each plugin jar, loading them as bundles, jumping through a few hoops to > get > the correct ClassLoader, and then loading the class. The problem with the > second approach is that I have to wrap all plugins before anything will > work. I'd very much like to avoid this requirement (for now) because this > will only work with plugins that I have and not those developed by users. > > Can anyone provide any guidance on loading classes that aren't part of > bundles? Is this possible with Felix? I apologize if this is a bit > vague, > but I'm still very new to OSGi. > > thanks, > Mike > > -- > ____________________________________________________________ > Michael Smoot, Ph.D. Bioengineering Department > tel: 858-822-4756 University of California San Diego >

