JAR - Java Archive File Format

This section describes the Java archive, JAR, file format, which is an extension of the ZIP file format.

JAR (Java Archive): A file format that compresses many files into a single package file. A JAR may contain additional package attributes and supporting data. It has some interesting features:

The main purpose of a JAR file is to aggregate your .class files, not your .java files, into a single file to distribute them to your customers. A JAR file can be directly included in the class path if you want to access those class files in the JAR file. No need to extract those class files into Java class directories.

Usually, JAR files are managed by the 'jar' tool provided in the JDK package.

But JAR files can also be managed by most ZIP tools, since JAR files are really ZIP files.

Last update: 2015.

Table of Contents

 About This Book

 Java Tools Terminology

 Installing Java 8 on Windows

 'javac' - The Java Program Compiler

 'java' - The Java Program Launcher

 'jdb' - The Java Debugger

 'jconsole' - Java Monitoring and Management Console

 'jstat' - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jvisualvm (Java VisualVM) - JVM Visual Tool

'jar' - The JAR File Tool

JAR - Java Archive File Format

 'jar' - JAR File Tool Command and Options

 Creating the First JAR File - hello.jar

 Managing JAR Files with WinZIP



 Using JAR Files in Java Class Paths

 Creating Executable JAR Files

 'javap' - The Java Class File Disassembler

 'keytool' - Public Key Certificate Tool

 'native2ascii' - Native-to-ASCII Encoding Converter

 Outdated Tutorials


 PDF Printing Version