ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | January 2006 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Understanding classloaders

David Leangen wrote:
Thank you for this, Jeff!

If this is the problem you can set the context classloader
before (and reset after) the calls to the lib (assuming
it is using the context classloader).

Yes, this is all I need, I think.

How is this done in practice? Where do I get the context classloader from? I
tried bundleContext.getClass().getClassLoader(), but this didn't work for

You have to set the context class loader to be the bundle's class loader. bundlecontext.getClass().getClassLoader() gets the class loader of the BundleContext class. Assuming you are setting the context class loader from within one of your bundle classes, then just do this.getClass().getClassLoader() to get the bundle's class loader.

-> richard

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.