类文件到java文件的转换

发布于 2024-08-16 03:10:20 字数 36 浏览 2 评论 0原文

如何从编译文件中的类文件ie中获取java文件ie源代码?

How to get java file i.e source code from class file i.e from compiled file?

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

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

发布评论

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

评论(6

余厌 2024-08-23 03:10:20

查看这个 Java 反编译器。

另请参阅维基百科页面了解有关反编译的更多信息。

需要注意的是,反编译字节码得到的代码可读性不太好。

Check out this Java Decompiler.

Also see this Wikipedia page to know more about decompilation.

It should be noted that the code you get on decompilation of bytecode isn't very readable.

暮光沉寂 2024-08-23 03:10:20

你必须使用反汇编程序。

Java Decompiler 是一个不错的选择。

Java Decompiler 还有一个适用于 Eclipse 的插件。

You have to use a disassembler.

Java Decompiler is a good choice.

Also Java Decompiler has a plug-in for Eclipse.

贱人配狗天长地久 2024-08-23 03:10:20

您可以使用javap命令来获取文件的整体结构。

旁注:阻止任何人从编译的代码中获取源代码的最佳方法是使用混淆。

You can use javap command to get the overall structure of the file.

On the side note: Best way to disable anyone from getting the source from your compiled code is to use obfuscation.

半寸时光 2024-08-23 03:10:20

您可以使用 javap 来获取从字节码返回的源。

有很多工具和插件可以帮助您反汇编,您可以找到一些讨论过的此处

You can make use of javap for getting the source back from bytecode.

There are plenty of tools and plugin that help you to disassemble and you can find some discussed here.

雨夜星沙 2024-08-23 03:10:20

是的,你不能做任何像反向转换这样的事情。

您可以做的是在运行时修改字节码。 Java 中允许这样做...

检查 java.lang.instrumentation 包。这将在某种程度上帮助你实现你的目标......

Yes you cannot do anything like reverse conversion.

What you can do is modify the bytecode at runtime. That's allowed in Java...

Check for java.lang.instrumentation package. That will help you to achieve your goal to some extent...

迷乱花海 2024-08-23 03:10:20

我刚刚发布了一个独立的 Java Decompiler GUI(基于 Jad),您可以从 Util Java Decompiler (JAD based) v1.0

这是一个基于 Windows 的 .NET 4.0 应用程序,支持 *.jar 文件的拖放。

I just published a stand-alone Java Decompiler GUI (based on Jad) which you can get from Util Java Decompiler (JAD based) v1.0

This is a Windows based .NET 4.0 application, which supports the drag n'drop of *.jar files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文