Eclipse无法查看jar包源码解决办法

感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正!
如果转载,请保留作者信息。
博客地址:
https://blog.csdn.net/bai0324lin
邮箱地址:[email protected]


背景:eclipse无法查看项目jar的源码,点开jar包的类,出现以下错误!

/*jadclipse*/

/*
    DECOMPILATION REPORT

    Decompiled from: C:\Documents and Settings\Sai\Desktop\work\kiuybon-1.1.jar
    Total time: 0 ms
    Jad reported messages/errors:
    Exit status: 0
    Caught exceptions:
java.io.IOException: Cannot run program "jad" (in directory "C:\Documents and Settings\Sai\.net.sf.jadclipse\1321168101468"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at net.sf.jadclipse.JadDecompiler.decompile(JadDecompiler.java:160)
    at net.sf.jadclipse.JadDecompiler.decompileFromArchive(JadDecompiler.java:217)
    at 

解决办法

  1. 下载jad.exe(下载地址 http://varaneckas.com/jad/),根据需要选择符合自己系统的版本;
  2. 下载下来是一个zip的包(e.g.jad158g.win.zip),解压到当前文件夹;
  3. 点开eclipse Window > Preferences > Java > JadClipse ,修改decompiler及directory选项,如截图
  4. 点击OK,并重启eclipse。点击项目jar包类,可以查看源码

声明:以上问题及解决方案皆为经验积累,如有雷同,纯属巧合!希望对你有所帮助...... :)

猜你喜欢

转载自blog.csdn.net/bai0324lin/article/details/81288315