FindBugs - rsanchez-wsu/jfiles GitHub Wiki

FindBugs is a program that can be used as a plug-in for Eclipse. FindBugs looks for bugs in your Java code. More information about this free software can be found at http://findbugs.sourceforge.net/.

Contents

  1. Requirements
  2. Installation
  3. Using the FindBugs Plug-in
  4. Troubleshooting

Requirements


Installation

1) Open Eclipse. Click on the Help menu, then the Eclipse Marketplace menu item.

See image.

2) Search for FindBugs in the marketplace. Click to install the plugin and follow the prompts.
If nothing pops up for FindBugs, you will need to manually add the correct repository.

See image.

See image.


Using the FindBugs Plug-in

In Eclipse, open a project. In the Package Explorer on the left-hand menu (tree view), right-click on your project and find the Find Bugs menu option. This will call FindBugs to run and show problem markers in your code if it finds any issues. The problem markers are displayed in the source window, similar to Eclipse problem markers.

If you do not see the Package Explorer view, simply click on the Window menu at the top of Eclipse, choose Show View, and select Package Explorer.

See image.


Troubleshooting

Installation Troubleshooting

2a) To manually add the FindBugs repository, exit out of the marketplace, then click on the Help menu, then the Install New Software menu item. You can choose or add a repository to search for plugins. Click the Add button from the window that is already open. You may name the new repository anything you wish, but you will need to add the following URL for the Location: http://findbugs.cs.umd.edu/eclipse/. Click OK when done, and the software will add and search the new repository.

See image.

See image.

2b) If you select the new repository you added (in the image, we named it the "FindBugs Repository"), the software will search the URL for appropriate plug-ins. It should only find one, which will show up in the window after several seconds. Select the FindBugs plug-in package, then click Next. You will be required to click a few more Next buttons, accept the license agreement, accept the new unverified source, and restart Eclipse. After your restart, FindBugs will be active.

See image.