myeclipse8.5反編譯插件的安裝使用--jd-gui插件


在實際的工作中,可能會用到反編譯工具,尤其對於定制的myeclipse開發平台,很多的公共方法都進行二次分裝,無法直接查看,通過本插件的安裝,可以直接點擊查看分裝在jar包中的class文件,這對學習SSH的源碼包提供了一定的方便。

注意:本人安裝了該插件,導致myeclipse的SVN版本工具無法使用,特此聲明,需要提前進行備份myeclipse。

安裝環境為myeclipse8.5,請注意

首先下載反編譯工具的安裝包:

http://java.decompiler.free.fr/jd-eclipse/update/jdeclipse_update_site.zip

將下載的壓縮包拷貝到myeclipse的安裝目錄下(推薦,因為該目錄平台不做修改,放置到其他地方需要小心被刪除)

在這里需要用到這么一個JAVA類:

 1 import java.io.File;
2 import java.util.ArrayList;
3 import java.util.List;
4
5 public class CreatePluginsConfig {
6 private String path;
7
8 public CreatePluginsConfig(String path) {
9 this.path = path;
10 }
11
12 public void print() {
13 List list = getFileList(path);
14 if (list == null) {
15 return;
16 }
17 int length = list.size();
18 for (int i = 0; i < length; i++) {
19 String result = "";
20 String thePath = getFormatPath(getString(list.get(i)));
21 File file = new File(thePath);
22 if (file.isDirectory()) {
23 String fileName = file.getName();
24 if (fileName.indexOf("_") < 0) {
25 continue;
26 }
27 String[] filenames = fileName.split("_");
28 String filename1 = filenames[0];
29 String filename2 = filenames[1];
30 result = filename1 + "," + filename2 + ",file:/" + path + "\\"
31 + fileName + "\\,4,false";
32 System.out.println(result);
33 } else if (file.isFile()) {
34 String fileName = file.getName();
35 if (fileName.indexOf("_") < 0) {
36 continue;
37 }
38 int last = fileName.lastIndexOf("_");// 最后一個下划線的位置
39 String filename1 = fileName.substring(0, last);
40 String filename2 = fileName.substring(last + 1, fileName
41 .length() - 4);
42 result = filename1 + "," + filename2 + ",file:/" + path + "\\"
43 + fileName + ",4,false";
44 System.out.println(result);
45 }
46 }
47 }
48
49 public List getFileList(String path) {
50 path = getFormatPath(path);
51 path = path + "/";
52 File filePath = new File(path);
53 if (!filePath.isDirectory()) {
54 return null;
55 }
56 String[] filelist = filePath.list();
57 List filelistFilter = new ArrayList();
58 for (int i = 0; i < filelist.length; i++) {
59 String tempfilename = getFormatPath(path + filelist[i]);
60 filelistFilter.add(tempfilename);
61 }
62 return filelistFilter;
63 }
64
65 public String getString(Object object) {
66 if (object == null) {
67 return "";
68 }
69 return String.valueOf(object);
70 }
71
72 public String getFormatPath(String path) {
73 path = path.replaceAll("\\\\", "/");
74 path = path.replaceAll("//", "/");
75 return path;
76 }
77
78 public static void main(String[] args) {
79 new CreatePluginsConfig(
80 "D:\\Program Files\\Genuitec\\MyEclipse 8.5 M1\\jdeclipse_update_site\\plugins")
81 .print();// 注意此路徑就是你安裝插件的路徑,根據自己的具體路徑設置
82 }
83 }

該類的下載地址:http://dl.dbank.com/c029r2r7yv

只需在最后的幾行中,把自己的減壓的插件的路徑拷貝進入,點擊run,運行:

前面的四行針對的不是windows操作系統的,不必理會,主要是后面三行。

將最后三行拷貝:

找到myeclipse中的該路徑

MyEclipse 8.5 M1\configuration\org.eclipse.equinox.simpleconfigurator

,打開bundles.info文件,將之前的三行數據拷貝到最后(建議用editplus打開)

打開之前,需要備份bundles.info文件,防止出現意外,當出現錯誤信息后,直接覆蓋源文件即可

接下來,在myeclipse中進行配置:

保存,重啟myeclipse即可(假如之前打開):

 

反編譯成功,通過該工具,大家可以快速的SSH的源碼。

 

 

 

---------------------end


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM