D
D
duoman2018-10-30 23:45:45
Java
duoman, 2018-10-30 23:45:45

How to change and replace class file?

Good afternoon! I have jar' nick. With the help of debugging, I found in which class the NPE error occurred. How can you change this compiled class through the idea, build it and replace it in the original jar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bova, 2018-11-01
@bova8

Jar is like a zip.
you change the extension to zip, unpack, replace the class (if there were no changes in the signatures of public methods), pack it back, change the extension back from zip to jar

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question