大家也許用過(guò)其他的反編譯工具,比如
jad(前面的隨筆中有介紹),或者是集成的DJ Java Decompiler,jad可能用起來(lái)比較麻煩,但是DJ Java Decompiler還是蠻好用的。
這里我就不說(shuō)他們了,有空你們可以自己去down一個(gè)來(lái)玩玩。
我是非常喜歡用Eclipse的啦,在這里我就來(lái)說(shuō)說(shuō)基于Eclipse的Java反編譯插件,也許有人用過(guò)Jadclipse,確實(shí)很不錯(cuò)的,但是在這里我也不說(shuō)它了,我現(xiàn)在要說(shuō)的是Jode Decompiler.
安裝非常的簡(jiǎn)單,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編寫(xiě)的所以也不需要其他的什么組件來(lái)支持了,安裝好了可以看到Window => Preferences... => Java => Jode Decompiler選項(xiàng)卡。安裝好了再設(shè)置一下文件關(guān)聯(lián)就可以了,Window => Preferences... => General => Editors => File Associations找到"*.class"在"Associated editors"里面可以看到"Jode class file viewer"選中它再單擊Default按鈕就OK了.
--------------------------------------------------------------------------------------------------------------------
更新Myeclipse8.5下使用jad的方法:
準(zhǔn)備工作
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 官網(wǎng):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/創(chuàng)建eclipse文件夾,然后在eclipse文件夾中分別創(chuàng)建features、plugins文件夾,將net.sf.jadclipse_3.3.0.jar 分別拷貝到features和plugins文件夾中。
4. 重新啟動(dòng)myeclipse后,配置jadeclipse插件
5. 在eclipse窗口下,點(diǎn)擊Window > Preferences > Java > JadClipse > Path to Decompiler。(設(shè)置jad的絕對(duì)路徑,如 C:\java\Jad\jad.exe)。Use Eclipse code formatter(overrides Jad formatting instructions)選項(xiàng)打勾,與格式化出來(lái)的代碼樣式一致。
6. 在eclipse窗口下,點(diǎn)擊Window > Preferences > Java > JadClipse > Misc,將Convert Unicode strings into ANSI strings選項(xiàng)打勾,避免反編譯后可能出現(xiàn)的中文亂碼。