It's not a secret anymore!
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
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: 20080

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: 44028
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Software to count java SLOC
It's not a secret anymore!