I am trying to run the OSGi framework (Equinox) in the main method. Every time I start the framework, when I print BundleContext.getBundles().length, it says that only 1 Bundle is installed in the framework (this, of course, is a system package). When I install my first package, the package identifier will continue from the last session. let's say if I had 4 packages of the last session (and I stopped and deleted them all before stopping the system package), the first package identifier is set to 5. Now, I want to know how the structure selects the package identifier? Why and how does the infrastructure remember the last session, although I deleted all the packages? Is it because of the bundle cache? And if so, how can I clear the cache (restart numbering from 1)?
source
share