I am trying to create a backup file of a bundle that is installed in the runtime, so that I can uninstall it and then possibly reinstall from the backup if I want. Does anybody know how to get a handle on the location of the bundle file that is already installed in the runtime? I would like to do this in a way that will work regardless of OSGi container (specifically, I want it to work in Equinox and Felix). Ideally this would be information gained from the Bundle
object (or from information from an object acquired from the Bundle
object).
Edit: In a nutshell, I am getting every bundle installed (bundleContext.getBundles
) and from that attempting to determine file paths of the bundles.