启动Eclipse时"无法获取应用程序服务"错误

Gur*_*lki 54 java eclipse

当我试图启动我的日食时,我得到以下异常,它不会出现.

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)
Run Code Online (Sandbox Code Playgroud)

需要帮忙.谢谢.

Bal*_*usC 51

/configuration/config.ini文件应包含org.eclipse.core.runtime@start在commaseparated osgi.bundles属性中.这是默认osgi.bundles属性,可能是在某些升级期间(意外地)更改了:

osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
Run Code Online (Sandbox Code Playgroud)

您可以根据需要通过将其设置为VM参数来覆盖它/eclipse.ini:

-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
Run Code Online (Sandbox Code Playgroud)

  • 我有osgi.bundle设置我的配置我还不能开始我的日食 (8认同)
  • 我无法在我的eclipse目录中找到config.ini文件. (4认同)
  • 在**Mars**中,您可以执行**产品配置文件**(使用产品配置编辑器打开),转到**配置选项卡**,然后转到**启动级别**单击**"添加推荐..."**按钮.这为我修好了.参看 [截图](http://i.imgur.com/mE3LpCl.png). (4认同)
  • 既然您在5分钟后接受了答案,我可以假设您最终找到并修复了它吗? (2认同)

San*_*man 14

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

我这样做后,我的应用运行正常.然后我检查了config.ini以查看更改的内容,并看到org.eclipse.core.runtime现在已更改为org.eclipse.core.runtime@start.这符合BalusC的建议,我只是从.product编辑器中做到了.


eva*_*dor 12

为那些搜索" 确保org.eclipse.core.runtime包已解析并启动 "的人添加我的两美分:

将"任意"捆绑包添加到捆绑包列表只是因为它们似乎缺失并不总是最佳解决方案.有时它会变得非常令人沮丧,因为那些新的插件可能依赖于其他缺少的捆绑包,这需要更多捆绑等等......

因此,在将新依赖项添加到所需包的列表之前,请确保您了解为何需要该包(调试器是您的朋友!).

这里的这个问题没有提供足够的信息来使它成为所有情况下的有效答案,但如果您遇到缺少org.eclipse.core.runtime的消息,请尝试将eclipse.application.launchDefault系统属性设置为false,特别是如果你试图运行一个不是"eclipse应用程序"的应用程序(但可能只是在equinox之上的无头运行时).

这个链接可能会派上用场:http://help.eclipse.org/indigo/index.jsp? topic =%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html,寻找日食.application.launchDefault系统属性.


Nic*_*ick 6

上面接受的答案是正确的,但并不完全清楚。

您需要将以下行添加到 eclipse.ini 文件的底部:

-Dosgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@
Run Code Online (Sandbox Code Playgroud)

  • 仅当您有自己的答案时,请使用*发布答案*按钮。如果您想更正另一个答案,请使用该答案上的“编辑”链接进行编辑。 (3认同)

Ric*_*ldo 6

将操作系统/数据从旧机器传输到新机器后,我遇到了Mac OS Lion的这个问题.

解决了删除旧的eclipse文件夹(我在Applications文件夹中)和再次复制eclipse文件夹(相同版本,相同的解压缩zip文件,没有变化).


med*_*pal 5

尝试从命令行以以下方式运行它:

 >eclipse -clean
Run Code Online (Sandbox Code Playgroud)

或者,您可以使用java而不是默认值来运行它javaw

 >eclipse -vm c:\jdks\java_1.5\jre\bin\java.exe
Run Code Online (Sandbox Code Playgroud)