To enable SWT in Eclipse, there are various ways in Linux.What I did is :
(which also enables the standalone SWT application.)
1, download the "SWT binary and source" package for linux+gtk from www.eclipse.org, extract
to your local directory.(for me, /usr/share/eclipse/plugins/swt-gtk-plugins/)
2, copy the swt.jar from the extracted folder to $JAVA_HOME/jdk/jre/lib/ext . This make java
know where to find the SWT library classes.
3, change your evironment varibles:
export LD_LIBRARY_PATH=/usr/share/eclipse/plugins/swt-gtk-plugins
you may wanna write it in your .bashrc for convenience.
Something wield to me is, the environment variables I set seems only to be valid for the eclipse process invoked from a terminal.I still got problem to find the *.so dynamic link lib files if I started my eclipse IDE by clicking the icon on the desktop.