The Java TM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search

Trail: Overview
Lesson: Overview

## Packaging

> The JAR file format and the Java extension mechanism give you convenient and efficient ways to package and to install programs written in the Java programming language.

### Java ARchive (JAR) File Format

> Introduced in JDK 1.1, the JAR file format lets you bundle multiple class files and the associated resources into a single archive file that can be easily downloaded, e-mailed, or stored in one convenient package. In JDK 1.2 the JAR file format has new functionality for updating JAR files, provides new standard API for reading and writing JAR files, and supports the use of JAR files in the extension mechanism.

### Java Extension Mechanism

> JDK 1.2 supports extensions, which are packages of Java classes (and any associated native code) that application developers can use to extend the functionality of the core platform. The extension mechanism allows the Java Virtual Machine to use the extension classes in much the same way as the Java VM uses the system classes. The extension mechanism also provides a way to retrieve extensions from URLs when they are not available as part of the JDK or the Java Runtime Environment (JRE).

> Extensions are packaged as JAR files and are installed in the `/lib/ext` directory of the JDK or the JRE. When installed in the `/lib/ext` directory, extensions can be used by applets and applications without being explicitly included in the class path.

| Start of Tutorial > Start of Trail > Start of Lesson | Search