2

我正在尝试启动Equinox框架,类似于这里

java -jar "org.eclipse.osgi_3.9.0.v20130529-1710.jar" -consoleLog

但是,我收到以下错误:

!SESSION 2013-07-04 22:49:46.256 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Command-line arguments:  -consoleLog

!ENTRY org.eclipse.osgi 4 0 2013-07-04 22:49:46.692
!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:74)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:152)

问题:是否有关于 eclipse equinox osgi 框架 3.9.0 的最新说明?

4

2 回答 2

1

我找到了这个: https ://bugs.eclipse.org/bugs/show_bug.cgi?id= 371101 似乎官方文档似乎是错误的。正在做

java -jar -Dosgi.console.enable.builtin=true org.eclipse.osgi_3.9.1.v20140110-1610.jar -console

这适用于我的机器。Java 1.7.0_55

于 2014-05-16T13:52:59.990 回答
1

我将命令更改为:

java -jar "org.eclipse.osgi_3.9.0.v20130529-1710.jar" -consoleLog -console -configuration=C:\Dev\configuration\config.ini 

config.ini 文件:

osgi.bundles=reference\:file\:C\:/Dev/configuration/org.eclipse.equinox.console_1.1.0.201307051018.jar@start,reference\:file\:C\:/Dev/configuration/org.apache.felix.gogo.runtime-0.8.0.jar@start,reference\:file\:C\:/Dev/configuration/org.apache.felix.gogo.shell-0.8.0.jar@start,,reference\:file\:C\:/Dev/configuration/org.apache.felix.gogo.command-0.8.0.jar@start

我下载了:

http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.gogo.shell/0.8.0/org.apache.felix.gogo.shell-0.8.0.jar http:// /repo1.maven.org/maven2/org/apache/felix/org.apache.felix.gogo.command/0.8.0/org.apache.felix.gogo.command-0.8.0.jar http://repo1。 maven.org/maven2/org/apache/felix/org.apache.felix.gogo.runtime/0.8.0/org.apache.felix.gogo.runtime-0.8.0.jar

我检查了源代码org.eclipse.equinox.console并使用 eclipse 构建。
来源已从此处签出:git://git.eclipse.org/gitroot/equinox/rt.equinox.bundles.git.
请注意,config.ini 中文件名中的时间戳 (201307051018) 是我构建 jar 的时间。

开始仍然给我一条错误消息,但这次我有 gogo shell:

!SESSION 2013-07-05 14:15:41.837 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -configuration=C:\Dev\configuration\config.ini
Command-line arguments:  -consoleLog -configuration=C:\Dev\configuration\config.ini -console

!ENTRY org.eclipse.osgi 4 0 2013-07-05 14:15:42.479
!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:75)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:199)
bundleresource://8.fwk501544898/gosh_profile: ERROR: java.lang.RuntimeException: Command name evaluates to null: ${.context} bundle 0
g! ss
"Framework is launched."


id  State       Bundle
0   ACTIVE      org.eclipse.osgi_3.10.0.qualifier
6   ACTIVE      org.eclipse.equinox.console_1.1.0.201307051018
7   ACTIVE      org.apache.felix.gogo.runtime_0.8.0
8   ACTIVE      org.apache.felix.gogo.shell_0.8.0
9   ACTIVE      org.apache.felix.gogo.command_0.8.0
g! 

添加eclipse.ignoreApp=trueconfig.ini删除 IllegalStateException,导致:

Debug options:
    file:/C:/Dev/eclipse_source/rt.equinox.framework/bundles/org.eclipse.osgi/.options loaded
Time to load bundles: 12
bundleresource://8.fwk516992923/gosh_profile: ERROR: java.lang.RuntimeException: Command name evaluates to null: ${.context} bundle 0
g! ss
"Framework is launched."


id  State       Bundle
0   ACTIVE      org.eclipse.osgi_3.10.0.qualifier
6   ACTIVE      org.eclipse.equinox.console_1.1.0.201307051018
7   ACTIVE      org.apache.felix.gogo.runtime_0.8.0
8   ACTIVE      org.apache.felix.gogo.shell_0.8.0
9   ACTIVE      org.apache.felix.gogo.command_0.8.0
g! 
于 2013-07-05T13:18:50.307 回答