感謝朋友支援本部落格,歡迎共同探讨交流,由于能力和時間有限,錯誤之處在所難免,歡迎指正!
如果轉載,請保留作者資訊。
部落格位址: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
解決辦法
- 下載下傳jad.exe(下載下傳位址 http://varaneckas.com/jad/),根據需要選擇符合自己系統的版本;
- 下載下傳下來是一個zip的包(e.g.jad158g.win.zip),解壓到目前檔案夾;
- 點開eclipse Window > Preferences > Java > JadClipse ,修改decompiler及directory選項,如截圖
- 點選OK,并重新開機eclipse。點選項目jar包類,可以檢視源碼
聲明:以上問題及解決方案皆為經驗積累,如有雷同,純屬巧合!希望對你有所幫助...... :)