myeclipse10反编译插件安装

1.下载反编译工具jad(下面提供下载)

将下载下来的jad star 158.zip解压缩,将jad.exe文件放入jdk安装目录下

如:C:\Program Files\Java\jre7\bin  

2. 下载eclipse反编译插件net.sf.jadclipse_3.3.0.jar(下面提供下载)

3. 将 net.sf.jadclipse_3.3.0.jar 放入MyEclipse安装目录下,

  如 :安装目录 \Genuitec\dropins下 没有dropins,新建之,然后在dropins中新建features文件夹和plugins文件夹,将net.sf.jadclipse_3.3.0.jar拷贝到plugins中。

4.   然后新建java工程,运行以下代码(替换其中最后的代码,你电脑反编译插件所在的实际位置):

import java.io.File;   
import java.util.ArrayList;   
import java.util.List;   

/**  
* MyEclipse10.0 插件配置代码生成器  
*  
*  
*/  

public class CreatePluginsConfig   
{   
  
    public CreatePluginsConfig()   
    {   
    }   
  
    public void print(String path)   
    {   
        List<String> list = getFileList(path);   
        if (list == null)   
        {   
            return;   
        }   
  
        int length = list.size();   
        for (int i = 0; i < length; i++)   
        {   
            String result = "";   
            String thePath = getFormatPath(getString(list.get(i)));   
            File file = new File(thePath);   
            if (file.isDirectory())   
            {   
                String fileName = file.getName();   
                if (fileName.indexOf("_") < 0)   
                {   
                    print(thePath);   
                    continue;   
                }   
                String[] filenames = fileName.split("_");   
                String filename1 = filenames[0];   
                String filename2 = filenames[1];   
                result = filename1 + "," + filename2 + ",file:/" + path + "\\"  
                        + fileName + "\\,4,false";   
                System.out.println(result);   
            } else if (file.isFile())   
            {   
                String fileName = file.getName();   
                if (fileName.indexOf("_") < 0)   
                {   
                    continue;   
                }   
                int last = fileName.lastIndexOf("_");// 最后一个下划线的位置   
                String filename1 = fileName.substring(0, last);   
                String filename2 = fileName.substring(last + 1, fileName   
                        .length() - 4);   
                result = filename1 + "," + filename2 + ",file:/" + path + "\\"  
                        + fileName + ",4,false";   
                System.out.println(result);   
            }   
  
        }   
    }   
  
    public List<String> getFileList(String path)   
    {   
        path = getFormatPath(path);   
        path = path + "/";   
        File filePath = new File(path);   
        if (!filePath.isDirectory())   
        {   
            return null;   
        }   
        String[] filelist = filePath.list();   
        List<String> filelistFilter = new ArrayList<String>();   
  
        for (int i = 0; i < filelist.length; i++)   
        {   
            String tempfilename = getFormatPath(path + filelist[i]);   
            filelistFilter.add(tempfilename);   
        }   
        return filelistFilter;   
    }   
  
    public String getString(Object object)   
    {   
        if (object == null)   
        {   
            return "";   
        }   
        return String.valueOf(object);   
    }   
  
    public String getFormatPath(String path)   
    {   
        path = path.replaceAll("\\\\", "/");   
        path = path.replaceAll("//", "/");   
        return path;   
    }   
  
    public static void main(String[] args)   
    {   
        /*替换成你的插件的安装目录*/ 
        String plugin = "D:\\tools\\MyEclipse 10\\dropins\\plugins";
        new CreatePluginsConfig().print(plugin);   
    }   
}

5.找到 D:\tools\MyEclipse 10\configuration\org.eclipse.equinox.simpleconfigurator 中的 bundles.info  并且将上面程序运行结果添加进去。

5. 重启MyEclipse,配置 jadclipse

在Eclipse 的Windows—> Perferences—>General->Editors->File Associations 中修改“*.class”默认关联的编辑器为“JadClipse Class File Viewer”。如果没有*.class,则点击“add"增加一个。

安装设置完毕,可以双击class文件 。

5.设置jadClipse的path to decompiler为上面你放jad编译工具的目录

myeclipse反编译插件 一:下载插件 JAD : http://www.varaneckas.com/sites/default/files/jad/jad158g.win.zip(选择与操作系统对应的版本) JadClipse:http://sourceforge.net/projects/jadclipse/files/(选择Eclipse支持的版本) 二:安装 1,将下载到的JAD反编译工具解压,将得到的jad.exe放置到系统某一目录下,如C:\Java\jre1.5.0_07\bin;(位置可以随便放,以后配置要用,推荐放到java目录下) 2,将下载到的JadClipse压缩包net.sf.jadclipse_3.2.4.jar(对应你刚才下载的版本)放置到Eclipse目录下plugins内(该目录是专门放置插件的,你也可以自己建立个文件夹来放置插件,但要记住路径,后面需要配置) 3,在Eclipse目录下links文件夹内新建net.sf.jadclipse_3.2.4.jar.link文件,文件名可以随意,但后缀必须是link,文件内容为path=D:\\Eclipse(请参照你自己的路径进行设置) 三:配置 启动eclipse,打开:Window->Preferences->Java->JadClipse. 1、Path to decompiler,这里设置反编译工具jad的全路径名,比如C:\Java\jre1.5.0_07\bin\jad.exe. 2、Directory for temporary files,这里设置临时文件路径。 其他参数不用配置 四:使用 安装完成后,eclipse自动将JadClipse Class File Viewer设置成class文件的缺省打开方式。如果没有默认,可以在Eclipse的Windows——> Perference——>General->Editors->File Associations中修改“*.class”默认关联的编辑器为“JadClipse Class File Viewer”。设置完成后,双击*.class文件,eclipse将自动反编译。 注: 对于存在源代码的类,它不会强行反编译,也就是说它还是会用eclipse自带的Class File Viewer查看class文件。
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值