Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

can javac warn about unused imports?

843810Jun 27 2005 — edited Jun 29 2005
Guys,

Do you know if there is any way that sun's javac command line tool can be configured to warn if a java source file declares imports which are never used inside the file?

Many IDEs will somehow graphically indicate this (e.g. eclipse and intellij do), but I need this functionality from the javac tool for some stuff that I am doing.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2005
Added on Jun 27 2005
6 comments
1,327 views