安裝反編譯插件步驟:
方法一:安裝jad
1):下載插件:
下載jadclipse_3.1.0.jar版本,該版本支持eclipse3.1M6~3.2M2
下載jadclipse_3.2.0.jar版本,該版本支持eclipse3.2M3和eclipse3.2M4.
下載jadclipse_3.2.4.jar版本,該版本支持eclipse3.2M5~3.3M5
下載jadclipse_3.3.0.jar版本,該版本支持eclipse3.3M6以上版本
(選擇和你eclipse版本相符合的插件很重要,否則一直出現:Could not open the editor:
The editor class could not be instantiated.或者An error has occurred when activating this view )
2):下載Jad反編譯工具:
http://www.kpdus.com/jad.html#download,在該頁中找到適合自己操作系統平臺的jad下載。
下載後解壓,然後將解壓後的jad.exe文件複製到%JAVA_HOME%\bin目錄下面
(可以將jad.exe放到任意位置,只要記住其存放路徑就好,下面要用到)。
3):將下載好的jadclipse_3.3.0.jar複製到%ECLIPSE_HOME%\plugins目錄下。重啓eclipse前刪除文件%ECLIPSE_HOME%\configuration\org.eclipse.update 以我的經驗 一般需要重啓兩次才行。
4):打開Window>-Preferens>-Java會出現JadClipse選項
Path to decompiler:這裏設置反編譯工具jad的全路徑名,比如:%JAVA_HOME%\bin\jad.exe.
Directory for temporary files:這裏設置臨時文件路徑。比如jad
5):安裝完成後,eclipse沒有自動將JadClipse Class File Viewer設置成class文件的缺省打開方式。
如果沒有默認,可以在Eclipse的Windows—> Perference—>General->Editors->File Associations中修改“*.class”默認關聯的編輯器爲“JadClipse Class File Viewer”。設置完成後,雙擊*.class文件,eclipse將自動反編譯。
方法二:安裝Jodeclipse
安裝方法
1):從如下地址下載:
http://sourceforge.net/projects/jodeeclipse
把下載下來的文件jodeplugin_1.0.5.zip直接解壓到eclipse的plugins目錄下。
2):啓動eclipse,help -> Software Updates-> Find and Install... -> Search for new features to install,單擊"New Remote Site..." 在URL欄輸入 http://www.technoetic.com/eclipse/update然後下一步,就可以看到“jode decompiler plugin *.*”,選上安裝就可以了。安裝好後可以看到Window -> Preferences...-> Java -> Jode Decompiler選項卡,okay,安裝成功了。
配置:Window-> Preferences... -> General -> Editors -> File Associations找到"*.class"在"Associated editors"裏面可以看到"Jode class file viewer"選中它再單擊Default按鈕.