尝试在OSGi上启动Equinox以获取osgi提示时我得到了错误并且错误如
!SESSION 2013-07-23 12:18:46.215 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -console
!ENTRY org.eclipse.osgi 4 0 2013-07-23 12:18:46.574
!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)
我的config.ini文件中的条目如下:
osgi.bundles=file\:org.eclipse.equinox.console_1.0.0.v20111215-1210.jar@start,
file:\org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@start,
file:\org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@start,
file:\org.apache.felix.gogo.command_0.8.0.v201108120515.jar@start
有人可以建议一些解决方案来克服这个错误吗?
答案 0 :(得分:1)
看起来你正在使用Equinox启动器,这个启动器需要一个应用程序服务,我记得这是特定于Eclipse的。如果您尝试使用Equinox,我将不会使用此启动器。要么使用bndtools,要么制作自己的启动器(这很简单,看看Apache Felix:http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html(这对于Equinox来说完全相同)。
一般来说,Apache Felix的框架和捆绑包在这个级别上开始工作要容易得多。