Flafla2
Flafla2

Reputation: 701

Java - edit(unpack/pack) external jar at runtime?

I am developing a program that automatically modifies a jar file with already obtained class files(I am modding Minecraft automatically, to be exact). This would involve unpacking the jar into a folder, editing the files(just a simple use of the File class), and repacking the jar and deleting the temporary folder with the edited files. So, how would I go about decompressing/recompressing the jar file?

Upvotes: 0

Views: 1078

Answers (1)

Dave Newton
Dave Newton

Reputation: 160211

With the JarFile class (which inherits behavior from the ZipFile class).

Upvotes: 2

Related Questions