OSGI:如何在运行时在felix上导出系统软件包 [英] OSGI: how to export system packages on felix during runtime

查看:99
本文介绍了OSGI:如何在运行时在felix上导出系统软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我需要导出一些系统软件包时,我会做:

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);

但是如何在运行时导出某些软件包?例如,在工作的osgi框架上,我想安装一些捆绑软件,其中需要一些系统软件包,这些软件包在我启动felix时不会导出.

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.

推荐答案

没有办法动态地做到这一点.而且我不确定我是否了解目的,因为在启动框架时会提前知道软件包.为什么不全部导出?

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?

这篇关于OSGI:如何在运行时在felix上导出系统软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆