Hi Rajesh,
    I do not know why you want to load META-INF/.resource file. I
think this package just like the WEB-INF folder in single classloader
env, that should not be accessed by outside and it should be loaded
only by the OSGi runtime env. And you said you could export META-INF
package? it seems be strange, bacause that this folder should not be
exported according to OSGi specification.
    You know OSGi runtime includes multi ClassLoader env of every
bundle, and current classloader just could access the current bundles
classpath and the exported resource by the other bundles. So
classloader could not access the META-INF/resource, for this folder is
not included in default classpath.
    So there are three ways, I think, to solve your problem. The first
one is change your classpath; the second is to write a helper class
which should be singleton in current bundle, and load all
meta-inf/resource from I/O in OSGi runtime, and publish the OSGi
service; the last one I think you could extend the default classloader
to meet your requirement.

    Good Lucks!

-JackieLee
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to