Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] (no subject)


You could do: "Activator.class.getClassLoader()" (assuming that Activator is a class of the bundle you are looking for, so this makes most sense from within the bundle)

But anyway, in OSGi you shouldn't try (and you don't need in most cases) to interact with the classloaders directly. The BundleContext gives you methods to load classes and resources from a bundle (if you wanna do this manually). But in many cases you don't even need that - but it depends, of course, on your usecase.


         could you please tell me how can I get the ClassLoader of the
current bundle?It seems the
Activator.bundleContext.getClass().getClassLoader() can't work.
      Looking forward your reply,Thanks.

equinox-dev mailing list

Back to the top