大家也許用過其他的反編譯工具,比如
jad(前面的隨筆中有介紹),或者是集成的DJ Java Decompiler,jad可能用起來比較麻煩,但是DJ Java Decompiler還是蠻好用的。
這里我就不說他們了,有空你們可以自己去down一個來玩玩。
我是非常喜歡用Eclipse的啦,在這里我就來說說基于Eclipse的Java反編譯插件,也許有人用過Jadclipse,確實很不錯的,但是在這里我也不說它了,我現在要說的是Jode Decompiler.
安裝非常的簡單,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 *.*”了,選上安裝就可以了,由于Jode Decompiler是純Java編寫的所以也不需要其他的什么組件來支持了,安裝好了可以看到Window => Preferences... => Java => Jode Decompiler選項卡。安裝好了再設置一下文件關聯就可以了,Window => Preferences... => General => Editors => File Associations找到"*.class"在"Associated editors"里面可以看到"Jode class file viewer"選中它再單擊Default按鈕就OK了.
--------------------------------------------------------------------------------------------------------------------
更新Myeclipse8.5下使用jad的方法:
準備工作
1. 下載jad.exe文件:http://www.varaneckas.com/sites/default/files/jad/jad158g.win.zip
2. 下載jadeclipse插件:http://prdownloads.sourceforge.net/jadclipse/net.sf.jadclipse_3.3.0.jar?download
3. JadClipse 官網:http://jadclipse.sourceforge.net/wiki/index.php/Main_Page
安裝
1. 將jad.exe解壓到指定目錄。如:c:\java\jad
2. 將jadeclipse插件net.sf.jadclipse_3.3.0.jar 拷貝到myeclipse安裝目錄\Genuitec\Common\plugins\目錄下。
3. 在myeclipse安裝目錄下dropins/創建eclipse文件夾,然后在eclipse文件夾中分別創建features、plugins文件夾,將net.sf.jadclipse_3.3.0.jar 分別拷貝到features和plugins文件夾中。
4. 重新啟動myeclipse后,配置jadeclipse插件
5. 在eclipse窗口下,點擊Window > Preferences > Java > JadClipse > Path to Decompiler。(設置jad的絕對路徑,如 C:\java\Jad\jad.exe)。Use Eclipse code formatter(overrides Jad formatting instructions)選項打勾,與格式化出來的代碼樣式一致。
6. 在eclipse窗口下,點擊Window > Preferences > Java > JadClipse > Misc,將Convert Unicode strings into ANSI strings選項打勾,避免反編譯后可能出現的中文亂碼。