Reading and Writing JAR Files

The JDK 1.2 introduced several classes and packages to interact specifically with JAR files. These have been continued and also enhanced in the SDK 1.3. The classes and packages that deal with ZIP files are still in the core API as well.

The classes within the java.util.jar package can be used to read and write JAR files. Because the JAR file format is based on the standard ZIP file format, the package contains several classes that extend the classes found in the java.util.zip package.

Two other classes can be used in conjunction with reading and writing JAR files. They are java.net.URLClassLoader and java.net.JarURLConnection.

The java.net.JarURLClassLoader class is used to load classes and other resources from ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.