Eclipse Mars view JDK source codeDescription of the problem, the content of the source code section of the JDK class is not visible under Eclipse (Mars).
Right-click the string type:
Click to open the statement. As a result, you see an error that cannot be viewed in the source code:
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">
But right-clicking Open type hierarchy is completely possible, for example, to see the methods and members in the String class
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">
This is assuming that you want to double-click the detailed methods and members. The error page above will still appear. http://blog.csdn.net/bruce128/article/details/6887732 address. The workaround for the Mars (Chinese) version number is as follows:1. Menu bar (Form)-(preferences), select (Java)-(installed JRE), for example, as seen in:
2. Select the installed JRE, and then click Edit button to see the interface for example:
3. Click the arrow in front of the Rt.jar package. The following expansion options appear, you can see the source code connection is empty, set the source code connection location, click the source code attachment, see:
4. Configure the source code connection, select the external location, external files, select the installation JDK folder under the Src.zip file, the last click to confirm and complete.
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">
Results, right-click to open the Declaration, or F3 shortcut, or browse/open the declaration, to view the source code; First open the type hierarchy. You can also view the source code by double-clicking the detailed method name or member name.
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center ">
Cause analysis, because my JRE location and JDK location are separate. So you have to manually establish a source code connection. Delete the original JRE and change it to the JRE under the JDK folder, for example, as seen in:
Click Edit to view, Rt.jar has established a source code connection, for example, as seen, you can view the declaration directly.
Eclipse Mars view JDK source code