OSGi Equinox独立应用程序,如何

时间:2015-04-23 16:32:17

标签: java osgi equinox

我一直在使用bnd在eclipse中开发一个osgi应用程序。在IDE中一切正常,等等...... 现在我必须将我的应用程序导出到一个独立的osgi安装,我只是无法弄清楚如何。这可能听起来令人困惑,我看了一些教程,但在大多数情况下它们都是旧的。 使用的运行时是Equinox,这些天依赖于Apache Felix。可悲的是,Equinox文档适用于版本3.2 im使用3.10

尝试启动osgi的控制台输出:

java -jar org.eclipse.osgi_3.10.1.v20140909-1633.jar -consoleLog
!SESSION 2015-04-23 18:17:22.987 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_79
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments:  -consoleLog

!ENTRY org.eclipse.osgi 4 0 2015-04-23 18:17:23.743
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service.         Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:208)

有没有人知道那里的教程仍然是最新的,或者只是告诉我如何配置它?

提前THX。

更新

我现在已经开始工作了,以防任何人在开始时遇到同样的问题:

的config.ini:

osgi.bundles=org.apache.felix.gogo.runtime-0.10.0.jar@1:start,\
org.apache.felix.gogo.shell-0.10.0.jar@2:start,\
org.apache.felix.gogo.command-0.10.0.jar@2:start,\
org.eclipse.equinox.console.jar@2:start
osgi.noShutdown=true
eclipse.ignoreApp=true

shell命令:

java -jar org.eclipse.osgi_3.10.1.v20140909-1633.jar -consoleLog -clean -console

的文件系统:

./

org.apache.felix.gogo.command-0.10.0.jar
org.apache.felix.gogo.runtime-0.10.0.jar
org.apache.felix.gogo.shell-0.10.0.jar
org.eclipse.equinox.console.jar
org.eclipse.osgi_3.10.1.v20140909-1633.jar

./configuration/

config.ini

输出:

的OSGi> SS "框架已启动。"

id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.10.1.v20140909-1633
1       ACTIVE      org.apache.felix.gogo.runtime_0.10.0.v201209301036
2       ACTIVE      org.apache.felix.gogo.shell_0.10.0.v201212101605
3       ACTIVE      org.apache.felix.gogo.command_0.10.0.v201209301215
4       ACTIVE      org.eclipse.equinox.console_1.1.0.v20140131-1639

的OSGi>

0 个答案:

没有答案
相关问题