反编译java class并优雅的调试--http://www.blogjava.net/miaoyachun/archive/2013/02/22/395575.html

news/2024/7/7 5:02:40

https://sourceforge.net/projects/realignmentjd/files/ 官方文档



用jd-eclipse 插件来反编译java class文件的输出还是挺nice的,虽然阅读方便了 但是对debug确造成一定的困扰,主要问题是line number的不match.
Google了下遇到类似问题的真不少。最终找到了解决方案:
http://sourceforge.net/projects/realignmentjd/files/
-----------------

1. Download JD-Eclipse and JD-GUI - http://java.decompiler.free.fr/ and install.
2. Put a file realignment.jd.ide.eclipse_1.0.2.jar in eclipse/plugins directory.
    To use Realignment feature it is necessary to open the menu Preferences/General/Editors/File Associations and to select "*.class" file type and to choose "Realignment for JD Class File Editor" for Associated editors.
    Another possibility is the batch realignment after processing JD-GUI. To work properly you must to switch on the property "Display line numbers" in Help/Preferences of JD-GUI.
    To use this feature it is necessary to open the menu Preferences/Java/Decompiler/Batch Realignment and click button "Open dialog". Existing limitation: the realignment is performed only for the methods.
    To work properly it is necessary that the property "Display line numbers" in menu "Preferences/Java/Decompiler" was active.


JD-Eclipse插件 + realignment 补丁让优雅的debug class 文件成为可能。

如果只是为了阅读class代码,建议不要用 realignment 补丁,这样会降低代码的可读性(会多出大量的空行)



http://www.niftyadmin.cn/n/2008619.html

相关文章

centos7安装最新版git_https://my.oschina.net/antsky/blog/514586

whoru 发表于 2年前 阅读 5961收藏 10点赞 1评论 1 腾讯云 普惠云计算 0门槛体验>>> 摘要: 介绍yum和源码包安装的具体方式 方式一、yum安装 # yum install git 通过yum方式安装,版本比较旧,CentOS6.5上安装好是1.7.1版。如果想安装最新版或…

SQLServer2008如何copydatabase--https://www.2cto.com/database/201411/351603.html

xjh测试有效 首页>数据库 > SQL Server > 正文SQLServer2008如何copydatabase2014-11-12 09:22:27 个评论 来源:tianshijianbing1989的专栏 收藏 我要投稿SQL Server 2008如何copy database: 方法一:使用Microsoft SQL Ser…

node.js的koa@2性能测试

一直都知道node.js的性能很好,但是却没有实际测试过,今天用ab实际测试一下。 先上结果:支持13000并发(helloword) CPU: inter 酷睿 i3-2330M 2.2GHz 4核 内存: 6G 系统: Win64 (其实就是老旧的加装了4G内存…

使用sql语句创建修改SQL Server标识列(即自动增长列)--https://www.cnblogs.com/skylaugh/archive/2016/04/03/5350615.html

一、标识列的定义以及特点 SQL Server中的标识列又称标识符列,习惯上又叫自增列。 该种列具有以下三种特点: 1、列的数据类型为不带小数的数值类型 2、在进行插入(Insert)操作时,该列的值是由系统按一定规律生成,不允许空值 3、列值不重复,具…

剑指offer——面试题4:二维数组中的查找

1 // 面试题4:二维数组中的查找2 // 题目:在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按3 // 照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个4 // 整数,判断数…

常见网络攻击及防御

ARP攻击 前提是需要熟悉网卡的工作模式,网卡的工作模式分为单播、广播、组播等,arp协议发送请求是广播模式,回复是单播模式。概念:通过ip地址查找目标机器mac地址,源机器通过广播方式发送请求包(包里包含目…

office365邮箱设置

POP setting Server name: outlook.office365.com Port: 995 Encryption method: SSL SMTP setting Server name: smtp.office365.com Port: 587 Encryption method: TLS IMAP setting Server name: outlook.office365.com Port: 993 Encryption method: SSL

Nuxt.js 数据双向绑定

假定我们有一个需求,一开始通过mounted()将一个字符串渲染在页面上,但是我们经过操作后修改了数据并且需要将得到的结果重新异步渲染到页面中去,而不是跳转刷新页面来重新渲染 首先模板中data()中定义数据,并且要将定义的数据显示…