启动 Eclipse 时出现“无法获取应用程序服务”错误

2022-08-31 16:09:33

每当我尝试启动我的日食时,我都会得到以下异常,它没有出现。

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:368)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

需要帮助。谢谢。


答案 1

该文件应包含在逗号分隔属性中。以下是默认属性,也许在某些升级过程中(意外地)更改了它:/configuration/config.iniorg.eclipse.core.runtime@startosgi.bundlesosgi.bundles

osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start

如有必要,您可以通过在 中将其设置为 VM 参数来覆盖它:/eclipse.ini

-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start

答案 2

我遇到了同样的问题,以下是我解决它的方法:我在.product编辑器的“配置”选项卡上的“插件”部分添加了插件“org.eclipse.core.runtime”。我将其起始级别设置为默认值,自动启动设置为 true。我删除了其他插件。我的理由是这样的:Eclipse抱怨org.eclipse.core.runtime没有启动,所以让我们确保它确实启动了,并且它是唯一启动的插件。

在我完成此操作后,我的应用程序运行正常。然后,我检查了配置.ini以查看更改的内容,并看到org.eclipse.core.runtime现在已更改为org.eclipse.core.runtime@start。这与BalusC的建议一致,我只是从.product编辑器中完成的。


推荐