On the SWT FAQ there is a how-to for compiling a 64 bit version of SWT for Eclipse, however, it is currently incorrect and took a bit of research and experimentation to sort out.
Here is how to do it (I have copied the original how-to and made edits where appropriate.
In this case, I am using Eclipse 3.5.1 under Kubuntu 9.04.
In this how-to you will extract the SWT source from the CVS repository and build your own binaries.
- Start Eclipse and retrieve the org.eclipse.swt, org.eclipse.swt.gtk.linux.x86_64 and org.eclipse.swt.tools projects from dev.eclipse.org (see How to use SWT from CVS)
- In the org.eclipse.swt project rename tthe .classpath_gtk to .classpath.
- Convert SWT’s Java and C code from its 32-bit form to 64-bit:
- To convert the Java code in-place, open the build.xml ant script with Ant in the org.eclipse.swt project and run its “replace.32.to.64” target. Simply click on it to highlight it and then click on the “Run the Selected Target” button in Ant. Once this target has completed you must refresh (F5) the org.eclipse.swt and the org.eclipse.gtk.linux.x86_64 project in order to pick up the changes.
- To convert and build the C code, run the “build_natives” target in the same build.xml file. Refresh (F5) the org.eclipse.swt.gtk.linux.x86_64 project when this target has completed, to pick up the new libraries.
- Make sure to add the new compiled source library to your build path:
- Click on your project node in the Package Explorer.
- Right click on it and select “Link Source”.
- Browse to the org.eclipse.swt.gtk.linux.x86_64 directory and select it.
- Add all of the items in it.