Note that getResource always return null for fragments ... 2017-06-22 11:51 GMT+02:00 Dominik Marciniszyn < marciniszyn.domi...@gmail.com>:
> 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. > -- ------------------------ Guillaume Nodet