-
JAR(Java ARchive) is a platform-independent file format, which can combine multiple files into one file. Users can bind multiple Java applet and their required components. Class files, images and sounds) are converted into JAR files, and then downloaded to the browser as a simple HTTP (Hypertext Transfer Protocol) transaction, which greatly improves the download speed. JAR format also supports compression, thus reducing the file size and further shortening the download time. In addition, applet writers can also sign each item in the JAR file by digital signature to confirm its source. It is written in Java, fully backward compatible with the existing applet code, and can be fully extended.
This version of the Java platform extends the use of JAR format. Enhancements include the addition of command-line JAR tools, which can be used to create and update signed JAR files. At the same time, it also provides a new standard API (application programming interface) to read and write JAR files. In addition, the Java extension framework also provides a mechanism to deal with extended dependencies and other third-party libraries packaged as JAR files.
JAR function
Guide to jars.
List and signature specification
JAR file and extension schema
The new extension mechanism in Java platform packages the extension classes into JAR file format. In order to support the extension mechanism and related functions (such as encapsulation and version evolution), we provide a new manifest attribute. For more information, see Extended Specification.
Enhanced Jar tool
The Jar tool provides new -C and u options that can be used to create and update JAR files. See the Jar tool reference page:
Jar tool reference page (for Solaris)
Jar tool reference page (for Windows)
Reading and writing JAR files: API specification
Package java.util.JAR: a class for creating and reading JAR files.
Class java.net.JarURLConnection: an abstract class, which uses jar protocol to realize URL (Uniform Resource Locator) connection to JAR files.
Learning course
Java software website:
Java archive (JAR) file format in Java tutorial.