LinkLib: Java: Style Checkers

Style checks, ...

FindBugs
Looks for bugs in Java code. Open-source, free.
URL: http://www.cs.umd.edu/~pugh/java/bugs/
Java Coding Standard Checker
From Cafe au Lait Java News site: "Ralph Jocham's posted version 0.95 of JCSC (Java Coding Standard Checker), a configurable tool for checking Java source code for adherence to standard conding conventions such as naming conventions, code structure, class size, and line length. According to Rocham, version 0.95 "has been completely refactored. The core is now XML driven which makes the adding of further rules faster. Also, rules can be en-/disabled on a case by case basis and each rule can have a priority assigned. The priority can be used to group the parse results. These changes are reflected in an improved UI -- both in the ruleseditor and the generated XML/HTML documents. JCSC now supports CruiseControl2. This release also includes various bug fixes."
URL: jcsc.sourceforge.net
Checkstyle
Checks style for adherence to coding standards, eg, Sun. Also as a jEdit plugin.
URL: checkstyle.sourceforge.net/
Jalopy
Source code formatter. Very active support and available as plugin in many IDEs. Check out this short article on Jalopy.
License: $40
URL: jalopy.sourceforge.net/
JLint
Description: Checks Java programs for errors. Basis for CodeLint jEdit plugin. Looks for a limited number of errors in source or class files. Not very useful.
URL: http://artho.com/jlint/index.shtml

Unix only

DoctorJ - Java analyzer
Description: Analyzes Javadoc comments for correctness, generates statistics about the sizes of procs etc., and produces diagnostics for suspicious syntax (empty if, missing break, etc).
License: LGPL
URL: doctorj.sourceforge.net/
JAMIT
Unfortunately, this is only for Linux. [From home page] JAMIT, the Java Access Modifier Inference Tool can be used on Java class-files to infer tighter access modifiers. Tight access modifiers are commonly perceived as good programming practice. Yet, refactoring of code or just ignorance at the time where the code is written often lead to modifiers that are less restrictive than they could be.

More restrictive modifiers help to increase encapsulation, one of the major goals in object oriented program design. They can also serve as a criteria for good software engineering. In some cases, more restrictive modifiers can even help the compiler to produce better (= faster) code.

JAMIT is a static analysis tool build on top of the OVM/J Java Virtual Machine Framework that can analyze closed-world Java programms and give the programmer a list of modifiers that can be improved.
URL: www.ovmj.org/jamit/