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


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

/*jadclipse*/

/*
    DECOMPILATION REPORT

    Decompiled from: C:Documents and SettingsSaiDesktopworkkiuybon-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 SettingsSai.net.sf.jadclipse1321168101468"): 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(下载地址 ),根据需要选择符合自己系统的版本;
  2. 下载下来是一个zip的包(e.g.jad158g.win.zip),解压到当前文件夹;
  3. 点击OK,并重启eclipse。点击项目jar包类,可以查看源码

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

经验分享 程序员 微信小程序 职场和发展