How to Attach JDK source with Eclipse IDE?

This tutorial explains about how to attach JDK source code to your working environment. When you want to look at particulat source code, we can use CTRL+Click on the class name to refer the source code. However, by default developer can not refer JDK’s core Java files. It is referenced as the class files and you will see only the class files and will not see source code. You can link the source code under the JDK installation folder to enable the linking of source code for all the Java core classes.

You can navigate to this path for enable this option : Windows -> Preference -> Java -> Installed JREs -> Select a JRE -> Click Edit -> Select rt.jar -> Click Source Attachment -> Click Finish. It is done.

eclipse-1

eclipse-2

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Pin It on Pinterest

Share This

Share this post with your friends!

Share This

Share this post with your friends!