java.awt 包中有多少行代码(对于任何最新版本的 Java)?
我想估计 Java AWT 包中的代码行数。版本并不重要(Java 5 或 6 都可以)。我似乎无法在任何容易访问的地方找到源代码。
我只对 java.awt 包本身感兴趣,而不对任何 java.awt._ 包感兴趣。在行数中包含注释也很好。只需在 java.awt 目录中输入“wc -l *.java”即可。
谢谢!
I'd like to get an estimate of the number of lines of code that are in the Java AWT package. Version doesn't really matter (Java 5 or 6 is fine). I can't seem to find the source code in any easily-accessible place.
I'm only interested in the java.awt package itself, not any of the java.awt._ packages. Including comments in the line count is fine too. Just a 'wc -l *.java' on the java.awt directory will do fine.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Java 文件中有 81,295 行组成 Java 6 中的 java.awt 包。
There are 81,295 lines in the java files that make up the java.awt package in Java 6.
这是一道什么样的编程题?
无论如何,下载 这个 perl 脚本,解压 Java 源代码,您通常可以在名为 src.zip 的文件中找到该源代码在你的 java home 中(或者你可以从 Oracle 网站下载它们)并计算它们。
What kind of programming question is this one?
In any case download this perl script, unzip java sources that you can usually find in a file named src.zip somewhere in your java home (otherwise you can download them from Oracle site) and count them..
据我统计,OpenJDK7的jdk/src/share/classes/java/awt目录下有83188个,不包括子包。
编辑:现在没有子包。
There are 83188 in the jdk/src/share/classes/java/awt directory of OpenJDK7, by my count, not including subpackages.
EDIT: Now without subpackages.