Hi!
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.
HTH,
Martin
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
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev