Checker Framework logo

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 will learn to use the Checker Framework from the command line. The Checker Framework can also be used with other tools such as Maven or InteliJ IDEA, and you could follow the command-line version of the tutorial using one of those tools.

  1. Install the Checker Framework and then return to this page.
    Also set the alias javacheck to the Checker Framework compiler.
  2. Download and unzip the source files for the tutorial, then enter the src directory: cd src
  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