Idea import JDK source code to solve compile code after reading JDK source code

Source: Internet
Author: User

When using IntelliJ idea to read code, when tracking to such as Java.io.File class file, there is always "compile code" in the critical code snippet, so that people can not really trace to the inside of the code.

To resolve this issue, do the following:

Step1: Download JDK source code, Src.jar

1.1 JDK path for Mac installation:/system/library/java/javavirtualmachines/1.6.0.jdk/

SOURCE Location:/library/java/javavirtualmachines/1.6.0_65-b14-462.jdk/contents/home/src.jar

If not, you can go to https://developer.apple.com/downloads/to download,

I downloaded "java for OS X 2013-005 deloper Package"

Click Install again to see if there are any of the above files

1.2 Importing into idea

File-> Project Structure (Project Settings) > Platform Settings > SDKs > SourcePath

Click the + sign below to import the Src.jar

You can then view the

Reference Links:

1 Http://stackoverflow.com/questions/1313922/step-through-jdk-source-code-in-intellij-idea, the inside steps are very comprehensive

If you cannot open it, please refer to the following image:

2 Http://www.makaidong.com/%E5%8D%9A%E5%AE%A2%E5%9B%AD%E6%90%9C/46205.shtml,mac Download the source configuration

Note: Through the project under the "External Libraries" under the Class.jar, you can see Java Common class of source code. This is my fundamental purpose, hehe.

Idea import JDK source code to solve compile code after reading JDK source code

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.