java Java的反射器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/722378/
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-10-29 13:30:16  来源:igfitidea点击:

Reflector for Java?

java.netdecompiling

提问by bdd

Is there a Java equivalent to .NET Reflector?

是否有等同于.NET Reflector的 Java ?

Edit: more specifically, decompiling is what I'm after.

编辑:更具体地说,反编译是我所追求的。

采纳答案by Joachim Sauer

From what little I know the functionality of .NET Reflector is available in pretty much all Java IDEs, including Eclipse. Just add a jarfile to a projects and you can browse its classes just as you browse your own classes.

据我所知,.NET Reflector 的功能几乎可用于所有 Java IDE,包括 Eclipse。只需将jar文件添加到项目中,您就可以像浏览自己的类一样浏览它的类。

For the decompiler aspect (as opposed to the pure class browser) there are some alternatives as well. The JDK tool javaponly decompiles to byte-code so it isn't really useful to get to the source code (but might help with getting an understanding of the code).

对于反编译器方面(与纯类浏览器相反),也有一些替代方案。JDK 工具javap仅反编译为字节码,因此获取源代码并不是很有用(但可能有助于理解代码)。

JADis a pretty popular decompiler in the Java world and it produces compilable Java code most of the time (some bytecode sequences aren't easily translatable to valid Java 'though, so some corner cases exist).

JAD是 Java 世界中非常流行的反编译器,它大部分时间生成可编译的 Java 代码(尽管某些字节码序列不容易转换为有效的 Java,因此存在一些极端情况)。

回答by Michael Myers

See How do I decompile Java class files?There's a link there to JD-GUI, which seems to be about what you're looking for.

请参阅如何反编译 Java 类文件?那里有一个指向JD-GUI的链接,它似乎与您要查找的内容有关。

Edit:Also see Open Java *.Class Files.

编辑:另请参阅Open Java *.Class Files

Edit 2:And Best free Java .class viewer?, which specifically mentions .NET Reflector.

编辑2:最好的免费的Java .class观众?,其中特别提到了 .NET Reflector。

回答by helios

You can get JADfor decompiling .class into .java. It's pretty good at it.

您可以使用JAD将 .class 反编译为 .java。它很擅长。

If you use Eclipseget the jadclipseplugin too. You'll need to configure the path to the jad.exe. Next time you open a .class you'll see the decompiled source instead of the .class declaration. And you can browse with F3 too. It's very useful.

如果您使用Eclipse,也可以获取jadclipse插件。您需要配置 jad.exe 的路径。下次打开 .class 时,您将看到反编译的源代码,而不是 .class 声明。您也可以使用 F3 浏览。这是非常有用的。

回答by swilliams

I'm not super familiar with Java, but does JBrowserwork for you?

我对 Java 不是很熟悉,但是JBrowser对您有用吗?