我正在使用运行 OSX 10.8.2 的 27" iMac 和从http://www.eclipse.org/downloads/下载的最新 Eclipse 包 (4.2.0) (Java EE 开发人员的 Eclipse IDE,Mac OS X 64 位) .我解压下载的文件,它创建了一个名为“eclipse”的目录。
在该目录中,我双击 Eclipse 应用程序。它运行 2 秒左右,显示启动屏幕,然后死机并显示消息“发生错误。有关详细信息,请参阅日志文件配置 1351540676859.log。”
打开该日志会显示以下堆栈跟踪:
!SESSION 2012-10-29 15:57:56.642 -----------------------------------------------
eclipse.buildId=M20120914-1800
java.version=1.6.0_37
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/joshua/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/joshua/.eclipse_keyring -showlocation
!ENTRY org.eclipse.osgi 4 0 2012-10-29 15:58:02.633
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at org.eclipse.swt.widgets.Display.applicationWillFinishLaunching(Display.java:5053)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5153)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.finishLaunching(Display.java:4849)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5130)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.finishLaunching(NSApplication.java:59)
at org.eclipse.swt.widgets.Display.init(Display.java:2163)
at org.eclipse.swt.graphics.Device.<init>(Device.java:131)
at org.eclipse.swt.widgets.Display.<init>(Display.java:699)
at org.eclipse.swt.widgets.Display.<init>(Display.java:690)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:669)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
这是我的java版本:
Joshuas-iMac:Versions joshua$ java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode