title: How to extract .war files in java? ZIP vs JAR
body: <p>I have a web program where I want the user to be able to import a <code>.war</code> file and I can extract certain files out of the <code>.war</code> file.  I have found two class libraries:  <code>java.util.zip.*</code> and <code>java.util.jar.*</code>. From what I understand, a WAR file is a special JAR file which is a special ZIP file.  So would it be better to use <code>java.util.jar</code>?  If ZIP and JAR files are pretty much the same why is there a need for two different libraries?</p>