Showing posts with label jre. Show all posts
Showing posts with label jre. Show all posts

Tuesday, May 6, 2014

java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM


This problem occurs when we are trying to load 32 bit swt libraries (ex: swt.jar) on 64 bit Java

Example: When you are trying to open your 32 bit eclipse with 64 bit JRE, you will be facing this issue.

Another case would be, you would have packaged 32 bit swt libraries with your application, but you are trying to run your application on 64 bit JRE.

How to resolve ?
Make sure you will be using the same version either 32 bit/64 bit for eclipse and Java.


Error:
java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:197)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:687)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:145)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:88)
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:369)
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:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)