Eclipse 4.2 安裝Java反編譯外掛程式

來源:互聯網
上載者:User

在eclipse下安裝反編譯外掛程式可以直接查看 .class 檔案對應的java源碼。

反編譯外掛程式有 jdeclipse 和 jadeclipse。

(1) jdeclipse

http://www.djjavadecompiler.com/

(2) jad + jadeclipse

下載 jadeclipse:http://sourceforge.net/projects/jadclipse/files/

下載 net.sf.jadclipse_3.3.0.jar 後,複製到 eclipse主目錄下的 plugin檔案夾下,然後重啟 eclipse。

下載 jad.exe:http://www.varaneckas.com/jad/ (從維基中找到的地址)

下載完成後,複製到任意路徑,例如我複製到 %Java_Home%\bin 下,即:D:\Program
Files\Java\jdk1.6.0_33\bin\jad.exe

然後:

Window->Preferences->Java->JadClipse,在Path to decompiler中填寫反編譯工具jad的全路徑名,即:D:\Program
Files\Java\jdk1.6.0_33\bin\jad.exe。

然後:

Windows -> Perference -> General
-> Editors -> File Associations ,

      在File Type 下選擇*.class,然後在
Associated Editors下選擇JadClipse Class File Viewer,並點擊右側的 default 按鈕,設定為預設編輯器。

 
    注意,
這樣設定後,你雙擊某些 .class 檔案仍不能反編譯,這是因為這些class檔案沒有附加的源碼,要想解析所有 class 檔案,還需做如下設定:

      在File
Type 下選擇 *.class without source,(若沒有選項,則可以嘗試單擊右側Add按鈕自己添加
*.class without source
類型),然後在 Associated Editors下單擊右側add,添加JadClipse
Class File Viewer,然後選擇JadClipse Class File Viewer,並點擊右側的default按鈕,將 JadClipse Class File Viewer 設定為  *.class
without source
 的預設編輯器。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.