Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It is possible to add new entries to jar file using jar tool.
It is possible to modify some entries in jar file using jar tool.
But it is impossible to delete some entries from jar file.
Why?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

One good reason is that if you remove something from a jar, you risk breaking dependencies of other classes in the jar. But, I agree that this is babying a user who may know what can safely be removed.

You can work around this easily enough by renaming the jar to a .zip file and manipulating it with your favorite .zip editor (Windows File Explorer will do this). Rename it back to a .jar when you're done. Jar files use standard zip packaging and compression...

share|improve this answer
    
For example: dotnetperls.com/7-zip-examples –  javamonkey79 Feb 20 '13 at 20:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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