Java – Eclipse not working in windows 8

eclipsejavawindows 8

I recently upgraded to windows 8 ( which apparently is a really bad decision and waste of $40) and eclipse doesn't start. I downloaded Juno but the result is still the same. Appreciate if anyone could help me with it.

eclipse.buildId=M20120914-1800
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.osgi 4 0 2012-11-20 20:42:45.300
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    C:\Users\Lahiru\Desktop\eclipse\configuration\org.eclipse.osgi\bundles\628\1\.cp\swt-win32-4234.dll: A dynamic link library (DLL) initialization routine failed
    no swt-win32 in java.library.path
    Can't load library: C:\Users\Lahiru\.swt\lib\win32\x86_64\swt-win32-4234.dll
    Can't load library: C:\Users\Lahiru\.swt\lib\win32\x86_64\swt-win32.dll
    C:\Users\Lahiru\.swt\lib\win32\x86_64\swt-win32-4234.dll: A dynamic link library (DLL) initialization routine failed

    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
    at org.eclipse.swt.internal.C.(C.java:21)
    at org.eclipse.swt.widgets.Display.(Display.java:138)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:653)
    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(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:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Best Answer

Make sure you have JAVA_HOME and JRE environments set. Also it helps to have x64-bit JRE installed, if you are on a 64-bit OS and have the 64-bit Eclipse installed. http://www.java.com/en/download/faq/java_win64bit.xml

I ran a few similar issues on my two Windows 8 builds and was able resolve with those. Good luck.

Related Topic