重新编译包含goto指令的反编译Java(JD / JAD)源 [英] Recompile decompiled Java (JD / JAD) source that contains goto instructions

查看:239
本文介绍了重新编译包含goto指令的反编译Java(JD / JAD)源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(相关问题:支持goto的Java编译器或JVM语言?

我已经反编译了一个jar(合法地,出于调试目的)并且想要重新编译它。

I have decompiled a jar (Legally, for debugging purposes) and want to recompile it.

我已经同时使用了 JAD JD 并且由于goto指令而无法编译

I've used both JAD and JD and both don't compile due to goto instructions

例如

      goto _L1

      ...
      L1: 
      return true;

有没有简单的方法(或任何方式)重新编译它? (除非手动重构并删除 goto ')

Is there an easy way (or any way) to recompile it? (Except to manually refactor and remove the goto's)

推荐答案

不,没有。在您的情况下,JD和JAD都无法正确反编译类文件。 'goto'语句是关于实际程序流程的提示。

No, there isn't. In your case, neither JD nor JAD were able to decompile the class files correctly. The 'goto' statements are a hint about the actual program flow.

您可以直接联系Java Decompiler团队,发送一个类文件,其中反编译导致非法源代码并询问它是当前版本中的错误还是尚未实现的功能。

You could contact the Java Decompiler team directly, send in a class file where decompilation results in illegal source code and ask if it's a bug in the current version or a feature that has not yet been implemented.

这篇关于重新编译包含goto指令的反编译Java(JD / JAD)源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆