简体   繁体   中英

How to recompile jar file from command line

I have a jar file that consists of class files and java source files together (actually android unity plugin).

I want change the behaviour of one of the function by modifying the java source code and repackage it to jar file. Is it feasible to do with command line?

Use jar xf <JAR-file> to extract the entire JAR file to whatever directory you're currently on.

Add your new code to the files, removing the old code (make sure you have copies or back everything up, just in case).

Use jar cvf <JAR-file-name> * to create a JAR using all contents in the directory of your files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM