在macOSX上使用Eclipse:org.osgi.service.application.ApplicationException:未找到应用程序ID。

3

我在我的MacBook Pro上遇到了问题,需要重新安装Eclipse。
经过几个小时的研究,我想分享一下我找到的解决方案。

问题:启动Eclipse Helios失败。弹出一个窗口提示查看日志文件/Applications/eclipse/configuration/<xyz>.log,其中包含以下内容:

!SESSION 2011-07-05 14:05:17.027 -----------------------------------------------
eclipse.buildId=M20110210-1200
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product -keyring /Users/alessia/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/alessia/.eclipse_keyring -showlocation

!ENTRY org.eclipse.osgi 4 0 2011-07-05 14:05:18.260
!MESSAGE Application error
!STACK 1
org.osgi.service.application.ApplicationException: No application id has been found.
        at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:262)
        at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

原因:似乎发生了解析异常,但是Eclipse将其屏蔽并仅生成上述无用信息。

操作系统版本: 系统版本:Mac OS X 10.6.8(10K540) 内核版本:Darwin 10.8.0

我的config.ini文件:

#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Mon May 30 12:48:24 CEST 2011
org.eclipse.update.reconcile=false
eclipse.p2.profile=epp.package.java
osgi.instance.area.default=@user.home/Documents/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.6.2.R36x_v20110210.jar
equinox.use.ds=true
eclipse.buildId=M20110210-1200
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.epp.package.java.product
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=@config.dir/../p2/
eclipse.application=org.eclipse.ui.ide.workbench

我已经在Snow Leopard上运行了各种版本的Helios,没有问题。/Applications/eclipse/configuration/config.ini看起来像什么?另外,OS X的哪个版本? - David J. Liszewski
请将此帖子分成两部分:一个问题和一个答案。谢谢! - deceze
1个回答

10
  1. 移除文件/Application/eclipse/configuration/org.eclipse.core.runtime/.extraData.9/Application/eclipse/configuration/org.eclipse.core.runtime/.mainData.9
  2. 删除共享库文件夹中的任何XML解析器。例如,我在/Library/Java/Extensions中有xercesImpl.jar。为了确保,我将目录中的所有内容移动到/tmp。
  3. 重启eclipse
  4. 呼吸一下...现在应该可以工作了!
  5. 再次将您的库移回/Library/Java/Extensions

这就是全部内容。希望这能对您有所帮助!


尊敬的先生, 我遇到了与您相似的问题,但是我的情况不起作用,'org.eclipse.core.runtime'目录为空,/Library/Java/Extensions也是如此。您能帮助我吗? - Zoidberg
这对我来说完美地运作了...如果隐藏文件没有显示(默认情况下不会显示),以下是如何操作:http://guides.macrumors.com/Viewing_hidden_files_on_a_Mac - Lostsoul
这对于一个导致我无法安装或运行Eclipse的Selenium安装来说是救命稻草。谢谢! - greenstork

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接