Jadira is the home for Sousan and Chris Pheby's open source projects. These are reusable open source Java modules that provide first class solutions using the most effective current JEE technologies.

Tag Cloud
« Swing Layout Managers | Main | Eclipse Ganymede »

SWT 64-bit on Windows

One benefit of the release of standard 64-bit Windows builds of the Eclipse SDK is the possibility to conveniently run SWT applications on that platform.

Most SWT applications are still being packaged for a 32-bit VM. Its quite easy to modify them to run under a 64-bit JVM, here is the recipe which comes with no support or warranty whatsoever.

1. Install the application.
2. Extract swt.jar from the Eclipse.org SWT distribution. e.g. swt-3.4-win32-win32-x86_64 to the application installation directory. Typically you will be looking to overwrite an existing swt.jar instance.
3. Launch the application using a shortcut rather than any provided .exe wrapper. E.g.for the Azureus Bittorrent client, use the following shortcut: javaw.exe -classpath swt.jar;Azureus2.jar org.gudy.azureus2.ui.swt.Main

The Azureus example was originally documented on the Azureus Wiki.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (3)


I just found your blog, and find really interesting when you say " Its quite easy to modify them to run under a 64-bit JVM", but i havent been able to achieve so.
I developed a java application on netbeans, wich uses the DJNativeSwing webbrowser and swt.jar of 32 bits, but when i try to run that application
on a 64 windows7 system, it shows "Cannot load 32-bit SWT libraries on 64-bit JVM"

I heard you can force the Application to run on 32bits mode by adding -d32 to the code, but dont know where nor how.

Could you give me some tips about how to run my 32bits app on a 64bit Windows 7 os?

Thanks in advance¡

October 27, 2011 | Unregistered CommenterxXxOlivierxXx

Hi you need a version of the SWT binary compiled for 64 bit windows.

November 8, 2011 | Registered CommenterChris

Thanks a lot for your response¡
I knew this was the issue since a long time ago, but even i tried multiple swt versions none of them worked. I believe my confusion was that i though the "x86_64" .jar version was compatible with both 32 and 64 bits, but i just realized it is just for 64 bits.
Now my application works like a charm under 32 or 64 bits, and thanks to your DjNative swing lib ¡¡¡
Now i have just a minor bug on the WebBrowser class, but nothing to worry about ;)


November 9, 2011 | Unregistered CommenterxXxOlivierxXx

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>