2

I have a JAR file and I need to modify just one of my .class file. 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?

Can anyone help me?

Thanks Sepide

sinaei
  • 491
  • 2
  • 5
  • 19
  • duplicated of? : https://stackoverflow.com/questions/14069082/how-to-change-already-compiled-class-file-without-decompile – Alex Andrade Mar 12 '20 at 14:55

1 Answers1

1

You need to compile the Java source file back to a class file. The easiest way is probably to decompile the whole project, make the changes and then recompile it (possibly manually replacing only that particular jar).

But be aware that round tripping this way is not 100% bullet proof. Especially if there is obfuscation involved. That said, it can work and I have done so successfully in the past. YMMV.

Krumelur
  • 31,081
  • 7
  • 77
  • 119