The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits software developers to write their own compiler plug-ins.

In this tutorial, you will learn to use the Checker Framework to prevent null pointer exceptions, to prevent SQL injection attacks, and to improve code quality. In this tutorial, you can either follow the Eclipse Plugin tutorial, or the Command Line tutorial. Both tutorials use the same examples, but have instructions for the command line or the Checker Framework Eclipse Plugin. The Checker Framework can also be used with other external tools such as Maven or InteliJ IDEA, but they are outside of the scope of this tutorial.

  1. Install the Eclipse Plugin and then return to this page.
  2. Download and unzip the Eclipse projects for the tutorial.
  3. Getting Started, a simple example use of the Nullness Checker
  4. Validating User Input, an example using the Regex Checker
  5. Finding a Security Error, a complex example using the Tainting Checker
  6. Writing an Encryption Checker, an example of writing your own type checker
  1. Install the Checker Framework and then return to this page.
  2. As described in the installation instructions,set the alias javacheck to the Checker Framework compiler.
  3. Download and unzip the source files for the tutorial.
  4. Getting Started, a simple example use of the Nullness Checker
  5. Validating User Input, an example using the Regex Checker
  6. Finding a Security Error, a complex example using the Tainting Checker
  7. Writing an Encryption Checker, an example of writing a declarative type checker