Hi gurus,

I am trying to figure out a way, given an "OSGI-enabled" classloader like, for example, org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader to discover all available jars that this classloader can see (as list of URLs or URIs).

It is a fairly trivial exercise in "normal" Java. :-) You can call ClassLoader#findResources("META-INF/MANIFEST.MF"), and you'd get back a transitive closure of all jars in the following format: jar:file:/foo/bar/baz.jar!/META-INF/MANIFEST.MF.

Well, with org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader, I get the following response from this method (as a sample): bundleresource://105:1/META-INF/MANIFEST.MF.

How would I parse it to get to the actual jars?

What about in general? How is an OSGI classloader supposed to query its resource bundles?

Thanks so much for your help!

-Kyrill








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

Reply via email to