-
-
Save asavt92/21ad66f74dc23b5ee22db4bb13825a2e to your computer and use it in GitHub Desktop.
JAVA jar editing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(IntellijIdea) | |
we have EsServer.jar archive and we plan to change EsServer.class file and rebuild jar. | |
1. Unzip JAR | |
unzip EsServer.jar -d ./out/ | |
# or `jar xf ./EsServer.jar` to unzip to current dir | |
2. Decompile in IntellijIdea or by https://www.mikeleitz.com/blog/2018/8/9/decompile-java-classes-on-command-line `EsServer.class` | |
3. Update File EsServer.java | |
4. Compile EsServer.java | |
javac -classpath EsServer.jar ./EsServer.java | |
5. recreate archive | |
cd ./out && zip -r ../TestServer.jar * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment