Eclipse Mars view JDK source code

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.