Java的内置库实现 [英] Java's built-in libraries implementation
问题描述
有没有人碰巧知道在哪里,我可以看一下Java内置库的代码?
Does anyone happen to know where, if at all possible, I can take a look at the code of the java's built-in libraries?
我已经尝试过 Ctrl + Shift + B
(这是Netbeans与Eclipse的<$ c $等效c> Ctrl + Shift T )转到源,但我只能看到方法标题,并且正文始终为:
I've tried Ctrl + Shift + B
(which is the Netbeans' equivalence of Eclipse's Ctrl + Shift T
) to "go to source", but I can only see the method header, and the body is always:
//compiled code
throw new RuntimeException("Compiled Code");
例如,如果我尝试查看String.charAt(int)
For instance, I'd see the following if I tried to view String.charAt(int)
public char charAt(int i)
{
//compiled code
throw new RuntimeException("Compiled Code");
}
推荐答案
内置库源代码可用于jdk。例如,在Windows框上,jdk文件夹将包含src.zip,其中包含内置库的源
built-in libraries source code is available with jdk. For example on a windows box the jdk folder would contain src.zip which contain the sources for the built-in libraries
希望这会有所帮助。
这篇关于Java的内置库实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!