Download Extensions

Download Extensions Download extensions are sets of classes (and related resources) in JAR files. A JAR file’s manifest can contain headers that refer to one or more download extensions. The extensions can be referenced in one of two ways: by a Class-Path header by an Extension-List headerNote that at most one of each is allowed […]

Installed Extensions

Installed Extensions Installed extensions are JAR files in the lib/ext directory of the Java Runtime Environment (JRETM) software. As its name implies, the JRE is the runtime portion of the Java Development Kit containing the platform’s core API but without development tools such as compilers and debuggers. The JRE is available either by itself or […]

Java Archive (JAR) Files

JAR (Java Archive) is a platform-independent file format that aggregates many files into one. Multiple Java applets and their requisite components (.class files, images and sounds) can be bundled in a JAR file and subsequently downloaded to a browser in a single HTTP transaction, greatly improving the download speed. The JAR format also supports compression, […]

Packaging Programs in JAR Files

Packaging Programs in JAR Files The JavaTM Archive (JAR) file format enables you to bundle multiple files into a single archive file. Typically a JAR file contains the class files and auxiliary resources associated with applets and applications. The JAR file format provides many benefits: Security: You can digitally sign the contents of a JAR […]

Jar and Zip Enhancements

 This page summarizes enhancements to the jar and zip support provided in JDK 6. API changes Two new compressed streams have been added: java.util.zip.DeflaterInputStream: Data read from this stream is compressed. java.util.zip.InflaterOutputStream: Data written to this stream is decompressed. For example, these can be useful if a client wants to send compressed data over a […]

JAR File Specification

Contents Introduction The META-INF directory Name-Value pairs and Sections JAR Manifest Overview Manifest Specification Main Attributes Per-Entry Attributes Signed JAR file Overview Signature File Signature validation The Magic Attribute Digital Signatures Notes on Manifest and Signature Files JAR Index Overview Index File Specification Backward Compatibility Service Provider Overview Provider Configuration File Example API Details See Also IntroductionJAR […]

JAR File Overview

What is JAR? JAR stands for Java ARchive. It`s a file format based on the popular ZIP file format and is used for aggregating many files into one. Although JAR can be used as a general archiving tool, the primary motivation for its development was so that Java applets and their requisite components (.class files, […]

Using JAR-related APIs

Using JAR-related APIs The JavaTM platform contains several classes for use with JAR files. Some of these APIs are: The java.util.jar package The java.net.JarURLConnection class The java.net.URLClassLoader class To give you an idea of the possibilities that are opened up by these new APIs, this lesson guides you through the inner workings of a sample […]

The JarRunner Class

The JarRunner Class The JarRunner application is launched with a command of this form: java JarRunner url [arguments] In the previous section, we’ve seen how JarClassLoader is able to identify and load the main class of a JAR-bundled application from a given URL. To complete the JarRunner application, therefore, we need to be able to […]

The JarClassLoader Class

The JarClassLoader Class The JarClassLoader class extends java.net.URLClassLoader. As its name implies, URLClassLoader is designed to be used for loading classes and resources that are accessed by searching a set of URLs. The URLs can refer either to directories or to JAR files. In addition to subclassing URLClassLoader, JarClassLoader also makes use of features in […]