Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 201
santhan Avatar asked Dec 11 '10 08:12

santhan


3 Answers

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.

like image 191
Deepak Avatar answered Sep 23 '22 17:09

Deepak


A solution is given for the 32 bit installation of SWT on Eclipse here http://www.badprog.com/eclipse-standard-widget-toolkit-swt-installation

like image 34
TheCric Avatar answered Sep 23 '22 17:09

TheCric


The x86_64 version will definitely not work in a 32-bit process. You need to get a 32-bit version of SWT.

like image 21
Martin v. Löwis Avatar answered Sep 20 '22 17:09

Martin v. Löwis