【发布时间】:2013-10-05 11:12:21
【问题描述】:
我正在尝试让OSGi example application 工作,但是在从命令行启动 OSGi 时遇到了麻烦。
请注意,我不想在 Eclipse OSGi 环境中运行该包。这很好用。
首先,我创建了示例包。之后,我尝试在命令行中运行该应用程序。为此,我按照上述文章 official instructions 和 related question 中的说明运行 OSGi jar:
$ cd
$ cp /usr/local/eclipse/plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar
org.eclipse.osgi.jar
$ java -jar org.eclipse.osgi.jar -console
现在,OSGi 似乎可以运行,但没有显示控制台。
根据上述文章(见第4.2节)和a related question with solution,需要以下附加包:
- org.eclipse.equinox.console
- org.apache.felix.gogo.command
- org.apache.felix.gogo.runtime
- org.apache.felix.gogo.shell
他们失踪了吗?如果是,我该如何链接它们?
我的问题:如何在命令行中使用控制台运行 OSGi?
感谢您的帮助!
编辑 1:$ eclipse -console -noExit 并关闭 IDE 作为一种解决方法 :-) 遗憾的是,IDE 包也以这种方式加载。
【问题讨论】:
-
所以您已经通过解决方案链接到问题。你试过了吗?
-
我试过的是
java -jar org.eclipse.equinox.console_VERSION.jar,也叫加-console。结束于no main manifest attribute, in org.eclipse.equinox.console_1.0.0.v20120522-1841.jar。我是否链接捆绑包? -
使用 Equinox 检查 stackoverflow.com/questions/25733843/…