Not sure I fully understand what you are trying.

If you want a File object to the .properties file, I don't know of an
OSGi standard way to do it.

You can get a URL resource reference to access the contents of the file
in a number of ways though e.g,

Bundle.getResource(String name)
Bundle.getResources(String name)

Sorry - last example should have read:

xxxx.class.getClassLoader().getResource(String name);

-- Rob

bsaffel wrote:
I am somewhat new to the Felix platform and am having an interesting issue
where I have created a basic bundle which is simply being used to wrap some
third party libraries and perform some simple configuration tasks with
spring.  However, when I attempt to access a set of .properties files inside
the bundle from the classpath, I receive a FileNotFoundException.

I have attempted to get to this file in every way I can think of from basic
File IO utilities to creating a Spring DM OsgiBundleResource object around
it. The file is visible in the sense that the classloader can see it, and I
can retrieve its associated URI.  The failure point seems to be at the point
the system attempts to associate a File handle with the properties file in
question.

Does anyone have any ideas as to what could be going on here?

--


Ascert - Taking systems to the Edge
[email protected]
+44 (0)20 7488 3470
www.ascert.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to