Static (Class File) Checking with FindBugs™

FindBugs was written at the University of Maryland[5] as a tool to analyze compiled Java programs. Because it looks at the byte code rather than the source code,[6] it can find errors that source-based tools like PMD cannot, so the two programs complement each other (though they do overlap quite a bit). Like PMD, FindBugs can be used as a command-line tool, an Ant task, or an Eclipse plug-in. Unlike PMD, FindBugs provides a standalone GUI client; it does not provide plug-ins for Maven or for other IDEs. The FindBugs GUI provides its own project mechanism. I have not found this useful because my projects are already organized by the IDE I use, but if you're not using the supported IDE (Eclipse), you may find it useful.

Command-Line Usage

Getting started with the command-line interface (CLI) version of FindBugs can be as simple as downloading and extracting a Zip archive from the FindBugs Project page ( and running the provided batch file or shell script. By default this script will ...

Get Checking Java Programs now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.