Search code examples
javaosgiapache-felix

Can an OSGi JAR once running ask its container to load another OSGi JAR from another location?


Lets say I loaded my OSGi JAR into Apache Felix, I wrote the OSGi JAR. Can my OSGi JAR ask Apache Felix to load another OSGi JAR from a HTTP URL?


Solution

  • Yes, you can. See the javadoc of BundleContext.installBundle() function. By calling this function of the bundle context of your own bundle, you can install other bundles from any input stream.