我试图获得OSGi example application的工作方式,但从命令行启动OSGi时遇到了麻烦。OSGi控制台在命令行中未显示
请注意,我不想在Eclipse OSGi环境中运行该包。这工作正常。
首先,我创建了示例包。之后,我尝试在命令行中运行该应用程序。要做到这一点,我跑了OSGi罐子为上述文章中,official instructions中陈述和related question:
$ 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'。在org.eclipse.equinox.console_1.0.0.v20120522-1841.jar中没有主清单属性。我是否会捆绑捆绑? – aboger
运行Equinox检查http://stackoverflow.com/questions/25733843/how-to-start-osgi-console-equinox –