我正在尝试启动equinox框架,类似于here:
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 framework 3.9.0的最新说明?
答案 0 :(得分: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=true
添加到config.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!
答案 1 :(得分: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