This may seem like an odd thing to ask, but it’d take me forever to explain why I need it…
What I need is a way to edit a pre-existing Java .class file within its JAR file, with either a command prompt, or within my Python program. I need it to happen automatically, once the user pushes a button.
I have absolutely no clue how to do this, or if it’s possible.
A jar file is a zip package, you need only to extract the file, edit the content and put it back. The harder part is how to edit the .class file. The java .class file is a binary format , there’re several libraries may help you.