Java 反编译jar或class文件的程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19164764/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 14:39:44  来源:igfitidea点击:

Program to decompile jar or class files

javadecompiler

提问by Marc Rasmussen

I am looking to decompile either a complete .jarfile or simply .classfiles.

我想反编译一个完整的.jar文件或简单的.class文件。

I have been googleing around for about an hour now and havnt seem to find any tools to help me.

我已经在谷歌上搜索了大约一个小时,似乎没有找到任何工具来帮助我。

Most of the tools i found was either outdated or did not work.

我发现的大多数工具要么已经过时,要么无法使用。

I also found this postfrom stackoverflow but sadly all of the programs suggested can either not be downloaded or is out dated.

我还从 stackoverflow找到了这篇文章,但遗憾的是,所有建议的程序要么无法下载,要么已经过时。

采纳答案by Jatin

Well you have many alternatives: http://www.showmycode.com/.

那么你有很多选择:http: //www.showmycode.com/

In practice, I have found JADto be closely precise. JD-GUIis again quite good with eclipse like code viewer.

在实践中,我发现JAD非常精确。JD-GUI再次与 Eclipse 之类的代码查看器配合使用非常好。



Edit (2015): Fernflowerhas picked up quite some hype over last couple of years. Personally I find it to be the best. IntelliJ uses it as default from Idea13 onwards (This speaks volumes as intellij is considered cutting edge as per tooling in java world is concerned). Easiest way to use fernflower would be to drag drop .class files on intellij. In case you wish to use it from command line, then this mighthelp.

编辑(2015 年)Fernflower在过去几年中受到了相当大的炒作。我个人认为它是最好的。IntelliJ 从 Idea13 开始将其用作默认值(这说明了这一点,因为 IntelliJ 被认为是最先进的,因为 Java 世界中的工具是相关的)。使用 fernflower 的最简单方法是将 .class 文件拖放到 intellij 上。如果您希望从命令行使用它,那么这可能会有所帮助。

回答by Rob Starling

.jarfiles are just .zipfiles with some specific metadata files (META-INF/MANIFEST.MF), so they can be opened with any unzip program. (see http://en.wikipedia.org/wiki/JAR_%28file_format%29for more info)

.jar文件只是.zip包含一些特定元数据文件 ( META-INF/MANIFEST.MF) 的文件,因此可以使用任何解压缩程序打开它们。(有关更多信息,请参阅http://en.wikipedia.org/wiki/JAR_%28file_format%29

for the .classfiles therein, see this other question: How do I "decompile" Java class files?

对于.class其中的文件,请参阅另一个问题:如何“反编译”Java 类文件?