OSGI: how to export system packages on felix during runtime

拈花ヽ惹草 提交于 2019-12-11 12:34:18

问题


When I need to export some system packages I do:

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 during runtime? For example, on working osgi framework I want to install some bundle which requires some system packages which I didn't export when I start felix.


回答1:


There is no way to do this dynamically. And I am not sure I understand the purpose since the packages are known ahead of time when you start the framework. Why not export all?



来源:https://stackoverflow.com/questions/38761556/osgi-how-to-export-system-packages-on-felix-during-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!