OSGi控制台未在命令行中显示 [英] OSGi console not shown in command line

查看:126
本文介绍了OSGi控制台未在命令行中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 OSGi示例应用程序,但是从命令行启动OSGi时遇到麻烦.

I'm trying to get an OSGi example application working, but I'm running into trouble while starting OSGi from the command line.

请注意,我不想在Eclipse OSGi环境中运行捆绑软件.效果很好.

Note that I don't want to run the bundle in the Eclipse OSGi environment. This works fine.

首先,我创建了示例捆绑包.之后,我尝试在命令行中运行该应用程序.为此,我按照上述文章官方说明中所述运行OSGi jar. 和一个与之相关的问题:

First, I created the example bundle. Afterwards, I tried to run the the application in the command line. To do so, I run the OSGi jar as stated in the above-mentioned article, official instructions and a 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似乎正在运行,但是未显示控制台.

Now, OSGi seems to run, but the console is not shown.

根据上述文章(请参阅第4.2节)和 a解决方案相关的问题,还需要以下附加软件包:

According to the above-mentioned article (see Section 4.2) and a related question with solution, the following additional packages are required:

  • org.eclipse.equinox.console
  • org.apache.felix.gogo.command
  • org.apache.felix.gogo.runtime
  • org.apache.felix.gogo.shell

他们失踪了吗?如果是,如何链接它们?

Are they missing? If yes, how do I link them?

我的问题:如何在命令行中通过控制台运行OSGi?

My question: How can I run OSGi with console in the command line?

感谢您的帮助!

$ eclipse -console -noExit并关闭IDE可作为一种解决方法:-)可悲的是,IDE捆绑包也以这种方式加载.

EDIT 1: $ eclipse -console -noExit and closing the IDE works as a workaround :-) sadly, IDE bundles are loaded this way as well.

推荐答案

一种解决方法是不运行OSGi的Equinox实现与之相关的问题中 >:

A workaround is not to run Equinox implementation of OSGi Apache Felix Framework as stated in the mentioned related question:

  • 下载框架.
  • 解压缩框架
  • 运行以下命令:

$ java -jar bin/felix.jar

无论如何,这对我来说似乎是一种解决方法,我仍然对如何从命令行使用Equinox框架感兴趣.

Anyway, this seems to be a workaround to me and I'm still interested in how to use the Equinox framework from the command line.

这篇关于OSGi控制台未在命令行中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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