Crash Course In Java Brain Surgery

insinuation and speculations: My thoughts about Java, HTML5, software development and IT in general

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

Written by  Viktor Gamov -

Last weekend spend in setup of environment for eclipse plug-in development. I have task to fix and update one plugin. This is add-on to Flash Builder.  But before adding something, it's good to run that plugin before. My environment is Mac OS X 10.7 Lion, Eclipse 3.6 (32bit because FB not supported 64bit version of Eclipse) and Flash Builder 4.5. But I faced with odd exception

!SESSION 2011-07-25 23:59:39.350



java.vendor=Apple Inc.

BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=en_US

Framework arguments:  -product org.eclipse.epp.package.jee.product

Command-line arguments:  -product org.eclipse.epp.package.jee.product -data
/Users/apple/Workspaces/work/../runtime-EclipseApplication -dev file:/Users/apple/Workspaces/work/.metadata/.plugins/org.eclipse.pde.core/Eclipse
Application/ -os macosx -ws cocoa -arch x86 -consoleLog

!ENTRY org.eclipse.osgi 4 0 2011-07-25 23:59:57.129

!MESSAGE Application error


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

 at org.eclipse.swt.internal.Library.loadLibrary(

 at org.eclipse.swt.internal.Library.loadLibrary(

 at org.eclipse.swt.internal.C.(

 at org.eclipse.swt.internal.cocoa.NSThread.isMainThread(


 at org.eclipse.swt.widgets.Display.(

 at org.eclipse.swt.widgets.Display.(

 at org.eclipse.ui.internal.Workbench.createDisplay(

 at org.eclipse.ui.PlatformUI.createDisplay(

 at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(

 at org.eclipse.ui.internal.ide.application.IDEApplication.start(


 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(

 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(



 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(

 at java.lang.reflect.Method.invoke(

 at org.eclipse.equinox.launcher.Main.invokeFramework(

 at org.eclipse.equinox.launcher.Main.basicRun(


 at org.eclipse.equinox.launcher.Main.main(

An error has occurred. See the log file


Mac OS X shipped with 2 versions of JVM - 32 bit and 64 bit accordingly. So, First I tried to change order of JVM preference from /Application/Utilities/Java Preferences but it didn't work.

After consulting with colleagues and googling I come up with solution. I went to Eclipse→Preferences→Java→Installed JRE and add default JVM argument *-d32 *(must be small d)

This command forces to use 32bit JVM. Happy coding!