This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes Software to count java SLOC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Software to count java SLOC" Watch "Software to count java SLOC" New topic

Software to count java SLOC

smee bond
Ranch Hand

Joined: Sep 29, 2007
Posts: 34
Could anyone suggest me a free software that can be used to count java Software Lines Of Code?
(Sorry if I am in the wrong forum! Thought this is the apt one)
Rob Spoor

Joined: Oct 27, 2005
Posts: 20131

Not the best one, but it's something I wrote years ago.
It can handle multiple files and directories and is quite configurable.

It's limited in that it cannot find comments that are after or before some code. Multi line comments are no problem though.

How To Ask Questions How To Answer Questions
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 44515
Can't you use the line numbers on a text editor or IDE?

[Edit: Rob Prime's suggestion seems a lot better /edit]
[ December 11, 2007: Message edited by: Campbell Ritchie ]
smee bond
Ranch Hand

Joined: Sep 29, 2007
Posts: 34
Thanks for your suggestions. I could have used textpad to count the number of lines, but I want the count of only the code without comments or blank spaces. Meanwhile I was doing some search on the net and found the following tool:
Its a neat tool....very helpful and easy to use.
I agree. Here's the link:
subject: Software to count java SLOC
jQuery in Action, 3rd edition