Re: How to put an external file on the classpath so code in karaf bundle can read it?

2017-10-18 Thread Guillaume Nodet
THere's no difference between getResource() and getResourceAsStream() in the way the resource is obtained. At the end, a call to getResourceAsStream(name) is the same as getResource(name).openStream(). What you need is a way to put your resource in the bundle classloader which can be done using a

RE: How to put an external file on the classpath so code in karaf bundle can read it?

2017-10-17 Thread KARR, DAVID
Won’t that still be deployed as a jar file? Doesn’t that mean that “getResource()” (as opposed to “getResourceAsStream”) will fail? From: Guillaume Nodet [mailto:gno...@apache.org] Sent: Tuesday, October 17, 2017 1:52 PM To: user Subject: Re: How to put an external file

Re: How to put an external file on the classpath so code in karaf bundle can read it?

2017-10-17 Thread Guillaume Nodet
One way to achieve that is to put the config file in a fragment and attach it to your bundle. It will be able to access those without any problem then. 2017-10-17 22:34 GMT+02:00 KARR, DAVID : > I'm working on a project using Karaf 3.0.1 (can't upgrade). > > A colleague has a