【问题标题】:gogo: CommandNotFoundException in osg consolegogo:osg控制台中的CommandNotFoundException
【发布时间】:2016-09-15 17:40:48
【问题描述】:

我通过 OSGI 控制台尝试了许多命令,但没有一个正在执行。

osgi> bundle
gogo: CommandNotFoundException: Command not found: bnl
osgi> bnl
gogo: CommandNotFoundException: Command not found: udebl
osgi> udebl
gogo: CommandNotFoundException: Command not found: el
osgi> el
gogo: CommandNotFoundException: Command not found: nudbe
osgi> nudbe
gogo: CommandNotFoundException: Command not found: lnudbe
osgi> lnudbe
gogo: CommandNotFoundException: Command not found: lnudbe
osgi> c
gogo: CommandNotFoundException: Command not found: c
osgi> 

我是 OSGI 的新手,实际上是昨天开始的。我正在阅读教程 http://www.javaworld.com/article/2077837/java-se/java-se-hello-osgi-part-1-bundles-for-beginners.html

我按照这篇文章运行了我的第一个 hello world 程序。我得到了想要的输出,但有很多例外。

我是否需要在我的 Eclipse 中进行一些更改才能开始插件开发?

请回复。

【问题讨论】:

标签: java eclipse eclipse-plugin osgi


【解决方案1】:

bundleorg.eclipse.equinox.console 包提供的 Equinox 特定命令。控制台命令由各种捆绑软件提供,但这些捆绑软件需要已启动才能注册命令。您可以使用help查看当前注册的命令。

您可能还没有加载org.eclipse.equinox.console 包,或者还没有启动它。尝试以下方法来启动捆绑:

osgi> help bundle
osgi> ss org.eclipse.equinox.console
"Framework is launched."


id  State       Bundle
104 RESOLVED    org.eclipse.equinox.console_1.1.200.v20150929-1405
osgi> start 104
osgi> ss org.eclipse.equinox.console
"Framework is launched."


id  State       Bundle
104 ACTIVE      org.eclipse.equinox.console_1.1.200.v20150929-1405
osgi> help bundle

bundle - display details for the specified bundle(s)
   scope: equinox
   parameters:
      Bundle[]   (<id>|<location>)

默认情况下,Equinox 不会自动启动所有捆绑包。如果您正在尝试直接运行 Equinox (java -Dosgi.bundles=bundle1,bundle2,bundle3 -jar …/org.eclipse.osgi_*.jar),请在捆绑包之后附加 :start 以使其自动启动。

【讨论】:

    【解决方案2】:

    我终于想通了。 命令没有错。我缺少一些需要手动下载和添加的库 我关注了这个Equinox start error (console bundle is missed)

    Dmytro Pishchukhin 的回答解决了我的问题。

    感谢您的建议。 :)

    【讨论】:

      猜你喜欢
      • 2012-05-11
      • 2015-11-29
      • 2017-07-23
      • 2011-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多