Recompile decompiled Java (JD / JAD) source that contains goto instructions

前端 未结 4 1654
轻奢々
轻奢々 2021-01-12 04:21

(Related question: Java compilers or JVM languages that support goto?)

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

I\

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 04:25

    All decompilers look for code patterns corresponding to Java source constructions and choose the source that fits the best.

    Apparently the code you have does not conform to any pattern stored in either JAD or JD so you get uncompilable Java source. This is most likely because JAD has not been actively developed for several years.

    I would suggest you look at the Soot project which has a much more aggressive decompiler.

    http://www.sable.mcgill.ca/soot/

提交回复
热议问题