How to contribute a bug fix to SWT

Set up your Java environment:

  1. Download and install a Java JRE (SWT only requires a 1.5.x JRE to run but we suggest using Java 7 to run eclipse).
  2. Download and install the current Eclipse build. (Select the "Eclipse Classic" download.)
  3. Setup SWT from GIT. Make sure to load org.eclipse.swt plus any swt fragment you need (for example, org.eclipse.swt.gtk.linux.x86), org.eclipse.swt.snippets, and org.eclipse.swt.examples.
  4. Click on any Snippet or example, and select Run As>Java Application. You can modify any of the existing snippets or make your own in order to try to reproduce the issue.
  5. Once the issue is reproducible, inspect the SWT source code to see if you can locate/fix the issue. (Debugging Tip: In gtk, you can switch between GTK2 and GTK3, by setting SWT_GTK3=0 or =1 in your launch configuration)
  6. When you have a patch that is ready for review, you should submit the patch to gerrit for review. You have to configure your git repo to push to gerrit. For more information and steps, please see Gerrit wiki page.

Understand SWT:

The page contains many links and resources that are useful for understanding SWT. Some of these are:

Understand open source:


Find the Operating System doc: