tags:

views:

152

answers:

3

My application throws the exception below.

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SW T libraries on 64-bit JVM.

How to solve this? What is the name of jar file needed?

A: 

You're simply building against the wrong version of SWT. Either download the 64bit Eclipse or grab the delta pack and build against the correct target environment.

arcticpenguin
What is the "delta pack"? I'm curious about a generic solution, because I would love to make my SWT application dynamically select the correct jar.Also, you should bear in mind that SWT needs to be the same version as your virtual machine -- not necessarily as your O/S.
Paul Lammertsma
The delta pack will not let you do anything 'dynamic', it just gives you the ability to build for any target from any target.http://louismrose.wordpress.com/2009/01/23/installing-the-rcp-delta-pack-for-eclipse/
arcticpenguin
A: 

On 64-bit JVM's you need the 64-bit SWT. Current versions can be downloaded here:

http://download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php#SWT

Note the first two downloads, the first is for x32, the other for x64.

Daniel