简体   繁体   English

反编译原始 JAR 中的 .Class 文件

[英]Decompile a .Class file inside a Original JAR

I have a JAR file and I need to modify just one of my .class file.我有一个 JAR 文件,我只需要修改我的 .class 文件之一。 I decompiled it online and did my modification, actually is just a modification of some Texts inside my .class file My question is now how can I overwrite modified version in the original one?我在线反编译并进行了修改,实际上只是对我的 .class 文件中的一些文本进行了修改 我的问题是现在如何覆盖原始版本中的修改版本?

Can anyone help me?谁能帮我?

Thanks Sepide谢谢赛皮德

You need to compile the Java source file back to a class file.您需要将 Java 源文件编译回类文件。 The easiest way is probably to decompile the whole project, make the changes and then recompile it (possibly manually replacing only that particular jar).最简单的方法可能是反编译整个项目,进行更改,然后重新编译它(可能仅手动替换那个特定的 jar)。

But be aware that round tripping this way is not 100% bullet proof.但请注意,以这种方式往返并不是 100% 防弹。 Especially if there is obfuscation involved.特别是如果涉及混淆。 That said, it can work and I have done so successfully in the past.也就是说,它可以工作,而且我过去已经成功地做到了。 YMMV.天啊。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM