我将命令更改为:
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!