【问题标题】:See OSGi bundles查看 OSGi 包
【发布时间】:2013-03-12 00:55:38
【问题描述】:

我有 Eclipse 3.8.1,我想查看启动了哪些 OSGi 包,所以我在 eclipse/plugins 目录的 cmd 中写了:

java -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar -console

但是什么都没有发生,只有空行

我必须安装一些东西才能看到它们吗?

【问题讨论】:

标签: eclipse cmd osgi bundle equinox


【解决方案1】:

如果您已经运行了 eclipse,那么您可以从 Console 视图访问 Host OSGI Console

更新 我认为this 就是您要找的东西

$ java -Dosgi.bundles=org.eclipse.equinox.console_1.0.0.v20120522-1841.jar@start,org.apache.felix.gogo.command_0.8.0.v201108120515.jar@start,org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@start,org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@start -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar -console

【讨论】:

  • 谢谢,@shyam,但是当我的 Eclipse 关闭时,我如何才能看到仍在运行的 OSGi 包?
  • 如果 Eclipse 本身没有运行,任何捆绑软件将如何运行? OSGI 容器应该在您加载任何包之前运行,对吧?
  • 不知道,我以为OSGi容器不用安装Eclipse就可以使用
  • @Xelian 请看更新是你要找的吗?
  • 是的,如果我将 jar 版本更改为我的,它可以工作。谢谢@shyam
【解决方案2】:

有两种选择。它们如下:

  1. 创建一个配置文件夹并放置一个 config.ini 文件。在config.ini文件中设置如下内容:

osgi.console.enable.builtin=true

这将使用默认控制台启动 Equinox 框架。

  1. 或采取以下步骤。详情查看:http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm

将必要的捆绑包放在一个文件夹中。捆绑包是:

org.apache.felix.gogo.command_0.8.0v<version>.jar
org.apache.felix.gogo.runtime_0.8.0v<version>.jar
org.apache.felix.gogo.shell_0.8.0v<version>.jar
org.eclipse.equinox.console_1.0.0v<version>.jar
org.eclipse.osgi.jar

在其中创建一个配置子文件夹和一个 config.ini 文件。 在 config.ini 文件中添加以下条目:

osgi.bundles=./org.apache.felix.gogo.runtime_0.8.0v<version>.jar@start,\
./org.apache.felix.gogo.command_0.8.0v<version>.jar@start,\
./org.apache.felix.gogo.shell_0.8.0v<version>.jar@start,\
./org.eclipse.equinox.console.jar@start,\
osgi.console.enable.builtin=false
osgi.console=<port>

使用以下命令行启动 Equinox 框架:java -jar org.eclipse.osgi.jar

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-13
    • 2018-05-31
    • 1970-01-01
    • 2013-03-23
    • 1970-01-01
    • 1970-01-01
    • 2015-09-08
    • 2016-06-29
    相关资源
    最近更新 更多