Eclipse反编译工具Jad及插件JadClipse配置(转)

Eclipse反编译工具Jad及插件JadClipse配置

    Jad是一个Java的一个反编译工具,是用命令行执行,和通常JDK自带的java,javac命令是一样的。不过因为是控制台运行,所以用起来不太方便。不过幸好有一个eclipse的插件JadClipse,二者结合可以方便的在eclipse中查看class文件的源代码。下面介绍一下配置:
    A.下载JadClipse,http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Download,注意选择与eclipse版本一致的版本,我用的是Eclipse3.4,所以选择下载版本net.sf.jadclipse_3.3.0.jar
    B.下载Jad,http://www.varaneckas.com/jad,下载相应版本
    C.将下载下来的Jadclipse,如net.sf.jadclipse_3.3.0.jar拷贝到Eclipse下的plugins目录即可。当然也可以用links安装,不过比较麻烦。
    D.将Jad.exe拷贝到JDK安装目录下的bin文件下(方便,与java,javac等常用命令放在一起,可以直接在控制台使用jad命令),我的机器上的目录是D:\Program Files\Java\jdk1.6.0_02\bin\jad.exe
    F.然后,重新启动Eclipse,找到Eclipse->Window->Preferences->Java,此时你会发现会比原来多了一个JadClipse的选项,单击,会出现,如下:,在Path to decompiler中输入你刚才放置jad.exe的位置,也可以制定临时文件的目录,如图所示。。当然在JadClipse下还有一些子选项,如Debug,Directives等,按照默认配置即可。
    G.基本配置完毕后,我们可以查看一下class文件的默认打开方式,Eclipse->Window->Preferences->General->Editors->File Associations,我们可以看到下图:
,我们可以看到class文件的打开方式有两个,JadClipse和Eclipse自带的Class File Viewer,而JadClipse是默认的。
    H.全部配置完成,下面我们可以查看源码了,选择需要查看的类,按F3即可查看源码,如查看Annotation中的Target,使用jad查看源码如下:
大家可以看到最上面的一行
"/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.",说明是由jad反编译的。

PS:网上说对于存在源代码的类,它不会强行反编译,也就是说它还是会用eclipse自带的Class File Viewer查看class文件。这个我还没有进行过验证。 另外附上我用的jad和jadclipse的压缩包,方便大家下载:/Files/landon/DeComiler.rar

 

 

 

 

Installation

 

  • Put the JadClipse JAR file into the plugins folder of your Eclipse installation.
  • Restart Eclipse (eclipse -clean).
  • Get Jad.
  • Put the Jad executable into a directory that is in the execution path of your operating system. Alternatively, you can configure the path to the Jad executable under Window > Preferences... > Java > JadClipse > Path to Decompiler. (Set the full path, e.g. C:\Program Files\Jad\jad.exe)
  • Go to Window > Preferences... > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the default file association for *.class files.

 

 

 

Troubleshooting

 

The JadClipse plug-in is not activated when I start Eclipse.
You'll need to launch Eclipse with the -clean flag to allow the environment to detect the plug-in. Subsequent launching of Eclipse won't require the -clean flag.

 

eclipse -clean

 

 

 

The Eclipse Class File Viewer instead of the JadClipse Class File Viewer is opened.
Go to Window > Preferences... > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the default file association for *.class files.

 

 

 

The JadClipse Class File Viewer does not show the decompiled source.
If the editor contains the following text segment JadClipse was not able to execute the Jad binary. Make sure that the path to the binary (Path to Decompiler) is set correcly in the preferences.

 

/*jadclipse*/

/*
	DECOMPILATION REPORT

	Decompiled from: D:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar
	Total time: 16 ms
	Jad reported messages/errors:
	Exit status: 0
	Caught exceptions:
java.io.IOException: CreateProcess: (...)

http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Installation

 

 

http://jd.benow.ca/jd-gui/downloads/#jd-gui

jd-gui

 

jd-gui-0.3.6.windows.zip

http://jd.benow.ca/jd-gui/downloads/jd-gui-0.3.6.windows.zip

http://blog.sina.com.cn/s/blog_437ff56b010166qb.html

时间: 2024-08-03 11:59:37

Eclipse反编译工具Jad及插件JadClipse配置(转)的相关文章

eclipse安装反编译工具jad打开.class文件报错

问题描述 eclipse安装反编译工具jad打开.class文件报错 /*jadclipse*/ /* DECOMPILATION REPORT Decompiled from: D:mavenrepositoryorgspringframeworkspring-webmvc3.2.4.RELEASEspring-webmvc-3.2.4.RELEASE.jar Total time: 0 ms Jad reported messages/errors: Exit status: 0 Caugh

JAVA反编译工具jad的简单用法

反编译工具jad简单用法 以下假设jad.exe在c:\java目录下 一.基本用法 Usage: jad[option(s)] 直接输入类文件名,且支持通配符,如下所示. c:\java\>jad example1.class c:\java\>jad *.class 结果是将example1.class反编译为example1.jad.将example1.jad改为example1.java即得源文件. 二.Option-o 不提示,覆盖源文件 三.Option-s c:\java\>

eclipse反编译工具那个功能比较强些?

问题描述 eclipse反编译插件那个功能比较强些?我想ctr+shift+r的时候把jar里面的xxx.class也能显示出来,可以吗? 解决方案 解决方案二:一般使用的是jad这个反编译工作.不过,在没有sun提供官方编译工具之前,都是浮云.行数都会有差距.解决方案三:这方面的软件不是太多解决方案四:jad解决方案五:我想ctr+shift+r的时候把jar里面的xxx.class也能显示出来,可以吗?解决方案六:当然可以啦!你用jd.edi.eclipse.feature_0.1.3,这是

[转] 强大的.NET反编译工具Reflector及插件

    刚接触.net 时就听说 Reflector这个强大反编译工具呢,只是一直没有去使用他. 今天update跟我说Reflector如何,如何有用,用的如何,如何爽,还得意的说反编译了不少DLL...本来本人对新鲜事就非常有兴趣,听他这 么一说.决定试一试这个传说中的工具.我用的版本是4.1.84.0,以,把自己编写DLL反编译了一下,反编译后的代码除了变量名不同外,其它 基本上是一至的,我把反编译后的代码导到相关的文件里(要用到插件),再用vs.net编译,全部通过,真是爽呀.围绕Ref

【技术贴】在MyEclipse6.5 中安装jadclipse(反编译工具) jad.exe

MyEclipse6.5的反编译插件jad的安装步骤 我的MyEclipse6.5的安 装目录是D:\MyEclipse 6.5,以下仅供参考 第一步: 下载jad.exe(Jad v1.5.8g版本)和net.sf.jadclipse_3.3.0.jar; (下载地址 : http://ishare.iask.sina.com.cn/f/33632485.html) 第二步: 将jad.exe放进c:\Program Files\Java\jdk1.6.0\bin目录底 下 第三步:将net.

【转】一个不错的eclipse反编译插件

在CSDN论坛上看到的一个不错的eclipse反编译插件,感觉看起来不错的样子,因而记下,原网址是:http://topic.csdn.net/u/20121030/14/CDE52930-BAF2-4F88-B751-3797A7EB3C44.html 闲暇之余,写了一个Eclipse下的Java反编译插件:Eclipse Class Decompiler,整合了目前最好的2个Java反编译工具Jad和JD-Core,并且和Eclipse Class Viewer无缝集成,能够很方便的使用本插

MyEclipse5.5.1安装Jad反编译工具错误

问题描述 MyEclipse5.5.1安装Jad反编译工具错误.link文件配置:path=./myeclipse/jadclipse可以反编译出jdk中的类,比如String就可以反编译出来.但是自己编译过的类无法反编译出来.错误提示:Anerrorhasoccurredwhenactiveatingthisview 解决方案 解决方案二:那你单独去下个jd-gui-0.3.1.windows.zip来试试,这个反编译工具挺不错的解决方案三:再下一个Jad反编译工具试试!!!解决方案四:来接分

7 款开源 Java 反编译工具

今天我们要来分享一些关于Java的反编译工具,反编译听起来是一个非常高上大的技术词汇,通俗的说,反编译是一个对目标可执行程序进行逆向分析,从而得到原始代码的过程.尤其是像.NET.Java这样的运行在虚拟机上的编程语言,更容易进行反编译得到源代码.当然,也有一些商业软件,对其程序进行了混淆加密,这样我们就很难用工具反编译了. 1.Java反编译插件 -- Jadclipse JadClipse是Jad的Eclipse插件,是一款非常实用而且方便地Java反编译插件,我们只需将下载的插件包复制到e

7款开源Java反编译工具

本文是码农网原创整理,转载请看清文末的转载要求,谢谢合作! 今天我们要来分享一些关于Java的反编译工具,反编译听起来是一个非常高上大的技术词汇,通俗的说,反编译是一个对目标可执行程序进行逆向分析,从而得到原始代码的过程.尤其是像.NET.Java这样的运行在虚拟机上的编程语言,更容易进行反编译得到源代码.当然,也有一些商业软件,对其程序进行了混淆加密,这样我们就很难用工具反编译了. 1.Java反编译插件 -- Jadclipse JadClipse是Jad的Eclipse插件,是一款非常实用