在点击java文件中的有些方法时,会提示source not found,这时不仅要引入对应的jar包,还要安装反编译插件。下面是mac环境eclipse中安装jad插件的步骤:
1.下载jadClipse 即JAD的jar包(net.sf.jadclipse_x.x.x.jar):https://sourceforge.net/projects/jadclipse/
下载Jad反编译工具:https://varaneckas.com/jad/
2.net.sf.jadclipse_x.x.x.jar拷贝到Eclipse的插件目录下:/Applications/Eclipse.app/Contents/Eclipse/plugins

mac的eclipse目录需要在应用程序上右键打开包内容

3.net.sf.jadclipse_x.x.x.jar拷贝到Eclipse的features目录下:/Applications/Eclipse.app/Contents/Eclipse/features

4.Jad拷贝到对应的java路径 下:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin

我拷贝的是解压后的文件中的jad1、Readme.txt、jad这三个

5.启动eclipse,打开:Eclipse->Preferences->Java->JadClipse.
Path to decompiler,这里设置反编译工具jad的全路径名,jad的路径:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/jad,这里写全,把jad也写上

6.修改字节码文件的打开方式,打开eclipse-Preferences-General-Editor-File Associations-修改class文件、class without source文件打开方式,Add-选择JadClipse Class File Viewer,并设置成默认

参考:
https://duanjiangong.iteye.com/blog/1186698
https://blog.csdn.net/g19920917/article/details/73609006?utm_source=blogkpcl15
网友评论