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
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.
Assuming you project is Maven one.Go the Project --> Right Click --> Maven -->Download Javadoc & sources. After performing these steps your problem will be resolved.
you have to add Eclipse Plugin from
HELP -> Eclipse Marketplace
I personally used
Enhanced Class Decompiler
just install it. and have fun.
In order to see the source codes of JDK
in eclipse you should add JDK
path instead of JRE
to your workspace or for a specific project SDK. I assume you are a developer and you've installed JDK
on your system.
To do that:
JRE
location to points to the JDK
location in your file system.Hope this would be helpful.