Oftentimes you can avoid it entirely. What is your use case?
On Thu, Jun 22, 2017 at 6:07 AM Dominik Marciniszyn <
[email protected]> wrote:
> Hi,
>
> I have two osgi bundles and I would like to get some resources files from
> one bundle to another. I've used BundleContext to get the second bundle by
> ID. Then I use getResource() method, pass the path parameter but always got
> null.
>
> Sample code I used:
> BundleContext context =
> FrameworkUtil.getBundle(MyClass.class).getBundleContext();
> context.getBundle(id_of_my_second_bundle).getResource("resource/res_file");
>
> Thank you for any advices or help,
> Dominik Marciniszyn
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Getting-resources-from-other-OSGi-Bundle-tp4050852.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>