简体   繁体   中英

Eclipse won't launch from clean install on OSX Mountain Lion

I am using a 27" iMac running OSX 10.8.2 with the latest Eclipse package (4.2.0) downloaded from http://www.eclipse.org/downloads/ (Eclipse IDE for Java EE Developers, Mac OS X 64 Bit). I extracted the downloaded file, it created a directory called "eclipse".

Inside that directory I double-click the Eclipse application. It runs for 2 seconds or so, displaying the splash screen, then dies with the message "An error has occurred. See the log file configuration 1351540676859.log for details."

Opening that log revealed the following stack trace:

!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)

Here is my java version:

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

尝试Eclipse IDE for Java Developers,而不是EE Developers(下载页面的第三个选项)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM