java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM in Windows x86 machine

santhan picture santhan · Dec 11, 2010 · Viewed 30.9k times · Source

I've just started using swt (windows x86_x64 compatible version). When I run a sample code snippet in Eclipse, I am getting the following error...

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
 at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
 at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
 at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
 at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
 at Snippets.main

I have Windows Vista on my machine. I believe this swt version should support both 32 bit and 64 bit Os. What am I missing to get things work for 32 bit?

If in case I've a wrong version of JVM, how do I change it?

Answer

Deepak picture Deepak · Jul 4, 2011

Please find the 32 bit library at following location...

http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.7-201106131736/swt-3.7-win32-win32-x86.zip

Use the swt.jar from zip.