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