How can I see Sun/Oracle code, in Java, on Eclipse? For instance, the source code of System.out.println.
When you installed the JDK, did you opt to install the source as well? It's typically in src.zip. If you configure Eclipse to build against the JDK and specify the location of src.zip (if it's not detected automatically) you can just go into the JRE types like any other.
(Note that you can't easily see the exact code for System.out.println
as it depends on the value of System.out
at the time... but you can look at PrintWriter
etc.)
Tell Eclipse to use the JDK as the Java runtime inside Eclipse.
Preferences -> Java -> Installed JRE's -> Add, and then point to the JDK installation directory. Then check it to be the default used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With