Issue
In Eclipse, I just imported an external JAR
. Viewing any of the classes in the Package Explorer will instead of showing a source code open a Class File Editor with saying "Source not found". The folder of the JAR I have downloaded, however, has only JAR
, no lib
, no src
, no docs
.
Is there still a way how to view/generate a view the source code so then I can view it in Eclipse properly?
Solution
Try this :
- Download java decompiler from http://jd.benow.ca/ and now double click on jd-gui and click on open file.
- Then open .jar file from that folder.
- Now you get class files and save all these class files (click on file then click "save all sources" in jd-gui) by src name.
Answered By - Siddharth_Vyas
Answer Checked By - Katrina (JavaFixing Volunteer)