How do I view JRE’s source code in Eclipse?

When you are coding in Eclipse, press CTRL and click on any core Java class name in your source. Eclipse will now show a screen saying you don’t have the sources installed. However, in this screen there is a link saying “Attach source…”. Click that link and import the src.zip file from your JDK installation directory (src.zip). This should do the trick

Leave a Comment