在JAR中更改已编译的Java .class文件 [英] Changing the compiled java .class files in JAR
问题描述
我的要求:我已经解包了jar
,然后在反编译中将.class
文件更改为.java
文件.
此.java
文件几乎没有错误,因为它使用了
现在,我想将.java
文件更改为.class
文件,然后添加到JAR
文件中,然后查看我的更改是否有效.
My requirement: I've unpacked a jar
and then changed a .class
file after de-compiling in to .java
file.
This .java
file has few errors as it uses few stuffs like methods and variable from other places which is in the JAR
.
Now I want to change the .java
file in to .class
file and then want to add in the JAR
and see my changes are working or not.
背景:
- 我已经解压缩了ATU Jar文件和 de-complied
ATUReportsListener.class
. - 我现在拥有
ATUReportsListener.java
文件,并且进行了一些更改 - 现在我想再次隐蔽到
.class
可执行文件和文件包 进入JAR.但由于ATUReportsListener.java
的内容很少 这取决于原始ATU JAR的其他文件 能够编译它.
- I've unpacked the ATU Jar file and the de-complied the
ATUReportsListener.class
. - I've the
ATUReportsListener.java
file now and I made some changes to it. - Now I want to covert to
.class
executable file again and the pack in to the JAR. But as theATUReportsListener.java
has few stuffs which are dependent on other files of the original ATU JAR.I'm not able to compile it.
我该怎么做?
转换为.class
文件.请提供您宝贵的意见.
How would i do that?
Converting to .class
file . Please give your valuable input.
推荐答案
.class文件仅在编译后创建.反编译和进行更改将不会使用相同的字节码.您需要对这些错误进行排序,然后再次进行编译
.class file is only created after compiling. decompiling and making the changes will not make it with same byte code. you need to sort those errors and compile it again
这篇关于在JAR中更改已编译的Java .class文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!