Hi everyone, I have curiosity about java api such as how many classes, packages are present in it. and also what it the line of code of whole Java API? I've read in java specialist newsletter that in java 1.3, the LOC was around half a million. what about java 1.6 ?
Open the API page, highlight the list of packages, or the list of classes, then copy and paste to a word processor. Then use the word count. See what you get. That should count classes (including interfaces and enums) and packages. Lines of code is more difficult.
The class library source code comes with the JRE in a file called src.zip. You could run a package like http://javancss.codehaus.org/ over it, which will provide the Non Commenting Source Statements (NCSS) - a much better number than the largely meaningless LOC. But through the recursive use of a grep-like tool you can get LOC as well.