OSGI: how to export system packages to felix at runtime

When I need to export some system packages, I:

final Map configMap = new HashMap();
configMap.put(Constants.FRAMEWORK_STORAGE_CLEAN, "onFirstInit");
configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA,"my packageshere");
felix = new Felix(configMap);

      

But how can I export some packages at runtime? For example, in the osgi production environment, I want to install some package that requires some system packages that I did not export when I ran felix.

+1


source to share


1 answer


There is no way to do this dynamically. And I'm not sure I understand the purpose as the packages are known in advance when you start with the framework. Why not export everything?



+1


source







All Articles