Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java's built-in libraries implementation

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?

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");

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");
}
like image 317
One Two Three Avatar asked Nov 20 '25 03:11

One Two Three


1 Answers

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

Hope this helps.

like image 154
krishnakumarp Avatar answered Nov 21 '25 17:11

krishnakumarp