Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to count the number of lines of code in an eclipse project? I can see the total number of lines for each file, but I'd like to see how much is generated across the whole project.

share|improve this question

3 Answers 3

up vote 10 down vote accepted

Check out the Eclipse Metrics plugin.

alt text

Note the 'Lines of code' statements.

Edit: Version 2 of Metrics, requiring Eclipse 3.5+, is available here http://metrics2.sourceforge.net/

share|improve this answer

You need to use the JavaNCSS tool, see JavaNCSS - A Source Measurement Suite for Java

I can't find any working links to Eclipse plugins that incorporate this library, only stale broken links.

But you can run it:

Also see JCSC which includes NCSS.

share|improve this answer

I've generally just used find and wc under Cygwin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.