How to see the source code for java SDK (java.lang, java.util, …) classes in Eclipse?

前端 未结 4 481
死守一世寂寞
死守一世寂寞 2021-01-24 05:07

I want to read jar class files into my eclipse. Suppose I wrote the following code:

List list = new ArrayList();

When I ctrl click on List, it

4条回答
  •  臣服心动
    2021-01-24 05:31

    See if you have a src.zip file in your JDK Home. This would contain the source code for all Java SE libraries. Just unzip and browse the Java files to view the source code.

    If you want to debug through the source files then follow the instructions of attaching source folder in Eclipse as mentioned above.

提交回复
热议问题