I have a jar, and I need to replace a class in it, at this moment, I can only open it with "archive manager" and then drag and drop the new compiled class into the jar, but I think this is really boring, if I can do with with just a command ?

Thanks ~

link|improve this question

72% accept rate
+1 for gui being boring :), but you should correct "archive manager"... – Johan Oct 18 '10 at 5:45
feedback

1 Answer

up vote 3 down vote accepted
zip -u stuff.jar file.txt

will update file.txt in stuff.zip . Note that for -u file.txt must already exist in the zip file, and will only be overwritten if it's newer than the one in the jar.

link|improve this answer
great tip. you could probably do it with 7-zip also. – djangofan Oct 18 '10 at 5:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.