Java反编译器

发布于 2024-10-06 13:16:54 字数 1536 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

不忘初心 2024-10-13 13:16:57

我使用过这个 eclipse 插件: JadClipse

和这个 java 反编译器: JAD

I have used this eclipse plugin: JadClipse

and this java decompiler: JAD

浮光之海 2024-10-13 13:16:57

我尝试了几个反编译器,其中大多数都未能为我尝试反编译的小程序生成正确的源代码(http://mrl.nyu.edu/~perlin/experiments/emotive-actors/,以防有人想要重现)。

工作得绝对完美的是 Cavaj 1.11,它生成的代码不包含任何语法错误,并且从源代码编译的小程序的运行方式与原始版本相同。我在 UI 方面缺少的是:Ctrl-A/Ctrl-C 键盘快捷键不起作用,并且没有可用的批量转换。

我尝试过的其他反编译器是:

  • JD Java 反编译器(免费软件)看起来不错,但它犯了很多错误带有变量声明(一些声明丢失,其他声明放置得不好)
  • Neshkov DJ Java Decompiler(共享软件)也看起来不错,它生成的代码包含的语法错误比 JD 少,但代码无法运行。鉴于该产品不是免费的,人们会对它抱有更高的期望。

I have tried several decompilers and most of them have failed to produce a correct source for the applet I was trying to decompile (which was http://mrl.nyu.edu/~perlin/experiments/emotive-actors/, in case anyone wants to reproduce).

The one which has worked absolutely flawlessly was Cavaj 1.11, the code produced by it contains no syntax errors and the applet compiled from the sources runs identically to the original. What I was missing on the UI side was: Ctrl-A/Ctrl-C keyboard shortcuts not working, and no batch conversion available.

The other decompilers I have tried were:

  • JD Java decompiler (freeware) looks nice, but it made a lot of mistakes with variable declarations (some declarations were missing, other were placed badly)
  • Neshkov DJ Java Decompiler (shareware) also looks nice, the code produced by it contained less syntax errors then JD, but the code was not working. Given the product is not free, one would expect a bit more from it.
岁月静好 2024-10-13 13:16:57

我无法回答你的第一个问题:这可能是有偏见的......

关于你的第二个问题,反编译是合法的。这一点对我来说非常重要。看看这个有趣的页面:http://www.program-transformation.org/Transform/LegalityOfDecompilation

I can not answer your first question: it would be biased, perhaps...

About your second question, the decompilation is LEGAL. This point is very important for me. Take a look on this interesting page : http://www.program-transformation.org/Transform/LegalityOfDecompilation

水溶 2024-10-13 13:16:57

JD 是我所知道的最好的 Java 反编译器。

JD is the best Java Decompiler I know.

放手` 2024-10-13 13:16:57

我发现 JD 非常好。不过,我遇到了一两个小错误,导致运行时出现意外行为。

例如,我有一个示例,其中原始 case 语句在最后一个节点上没有“break”(因为这自然是不必要的),但因为 JD 最终重新排序了节点,这意味着“默认”情况是意外地打电话来。我还遇到了字符集问题,我需要在事情结束时进行一些额外的 toString() 调用,才能按预期注销。除此之外,它很棒!

我使用了另一个反编译器DJ来帮助我找出JD反编译的代码有什么问题。但还有其他 DJ 无法处理的事情,所以我想两种反编译器的混合对我来说都有效:)

希望 Dupuy 先生会读到这篇文章!

I found JD to be very good. Though, there were one or two minor bugs I came across that resulted in unexpected behaviour at runtime.

For example, I had an example where the original case statement didn't have a 'break' on the last node (because naturally this is unnecessary), but because JD ended up re-ordering the nodes it meant the 'default' case was called unexpectedly. I also had an issue with character sets where I required some extra toString() calls on the end of things for it to log out as expected. Apart from that it was great!

I used another decompiler DJ to help me work out what was wrong with the code decompiled by JD. But there were other things that DJ couldn't handle, so I guess a mixture of both decompilers worked for me :)

Hopefully Mr Dupuy will read this!

过潦 2024-10-13 13:16:56

我建议使用 google 上出现的那个,即 JD Java 反编译器。
效果真的很好。

至于限制,你必须阅读特定软件的许可证,上面可能写着禁止任何方式的反编译。

I'd suggest the one that pops up on google, which is the JD Java decompiler.
It works really nice.

As for the restrictions, you'd have to read a license of particular software, there might be written that any way of decompilation is forbidden.

樱桃奶球 2024-10-13 13:16:56

我喜欢 JadClipse - 但它在某些地方显示了它的年龄。您将需要:

  • 安装了一个 jad 二进制文件
  • jadClipse
  • 将 Eclipse 首选项指向上面的 jad 二进制文件
  • 告诉它生成行号并对齐以进行调试

有几个缺点:

  • 代码是按顺序生成的,如果字节代码被重新排列,那么某些内容会在字节中出现较晚代码,但在原始源代码的早期,jad 不会倒带将反汇编代码放在正确的行。
  • jad 不太理解 Java 5 + 6 字节码。

I like JadClipse - but it shows its age in places. You will need:

  • a jad binary
  • jadClipse installed
  • point the Eclipse preferences to the above jad binary
  • tell it to produce line numbers and align for debugging

There are several shortcomings:

  • code is produced sequentially, if byte code was rearranged so something comes late in the byte code but was early in the original source jad does not rewind to put the disassembled code to the right line.
  • jad does not understand Java 5 + 6 bytecode very well.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文