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

6

10

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?

Kickoff answered 11/12, 2010 at 8:4 Comment(0)
O
5

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.

Optics answered 4/7, 2011 at 21:59 Comment(0)
S
4

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

Synesthesia answered 6/12, 2011 at 3:37 Comment(0)
P
1

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

Profession answered 11/12, 2010 at 9:30 Comment(0)
S
0

This happens if you try to run a 64bit library against a 32bit JRE. 32bit can run on 64bit but not vice versa.

If you have a 64bit JVM installed, you can modify settings in the menu Run > Run Configuration then select the correct JRE.

Otherwise just get the 32bit version of the SWT.

Soapbox answered 8/1, 2014 at 1:18 Comment(0)
O
0

One special case is that if you only see it when you try to open Android sdk manager, which indicates that the sdk tools cannot locate your java.exe properly. Go to your sdk folder, open tools/android.bat file, find the line says "set java_exe", change it to "set java_exe=ABSOLUTE_PATH_TO_YOUR_JAVA_EXE" and comment out the two following lines;

Onanism answered 10/4, 2014 at 2:19 Comment(0)
I
-1

My eclipse was not starting. I checked the logs in workspace/.metadata/.log. java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM exception was present. This was caused because my machine, eclipse, java configuration was like this Machine: Windows : 64 bit Eclipse : 64 bit Java : 32 bit

I corrected JAVA_HOME & Path. Did not seem to work. Solution : I added -vm with correct jvm path in eclipse.ini file. It worked for me. I was able to start eclipse. Example : I pointed to 64bit jvm to start 64bit eclipse

-vm C:\Program Files\Java\jdk1.7.0_75\bin\javaw.exe
Irredentist answered 28/3, 2016 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.