Finding unused import statements in a Java source

Does anyone know a tool (besides Eclipse or any other IDE) that I can use to search for unused imports in the Java source file?

I am looking for a type of command line tool (for integration into a larger script).

Thanks.

+6
java code-review
source share
1 answer

PMD has a rule on unused imports .

Other code quality tools may have similar rules.

+8
source share

All Articles