Eclipse cannot view the source code of the third-party jar package file solution

1. Open the third-party dependency package, the shortcut key of the source file: ctrl + mouseClick

2. Since the third-party jar packages we download, such as Spring and other related dependency packages, do not download the corresponding source files, the problem as shown in the figure often occurs.

   

    The workaround is as follows:

        1. The .class files are compiled and generated under the jar package, so install the corresponding decompiler plug-ins and decompile them into .java files, and then you can view the source code.

        2. First download the jar package of jadClipse (decompile plugin)

             Link: sourceforge.net/projects/jadclipse/

       3. Then, copy net.sf.jadclipse_3.3.0.jar to the plugins directory of eclipse;

       4. Then delete the org.eclipse.update file in the configuration directory of eclipse,

       5. If your eclipse is open, click File->Restart in the menu bar.

       6. Next, download the jad executable file from the link http://varaneckas.com/jad/, decompress it and put it on a disk.

     

        7. Open Eclipse, prefrence, set the executable file path of jad and the generated temporary file path, as shown in the figure:

             

      8. Next, set the default opening method of the *.class file type, as shown in the figure:

           

      9. Then, set the opening method of the *.class without source file type, as shown in the figure:

           

     10. Then press to select the class of the source code to be viewed, and press the shortcut key to view.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326741210&siteId=291194637