Java Tools Tutorials - Herong's Tutorial Examples - v6.23, by Herong Yang
JAR - Java Archive File Format
This section describes the Java archive, JAR, file format, which is an extension of the ZIP file format.
What Is JAR (Java Archive)? - JAR is 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.
Table of Contents
javac - The Java Program Compiler
java - The Java Program Launcher
►JAR - Java Archive File Format
jar - JAR File Tool Command and Options
"jar --create" - Creating New JAR File
"jar --list" - Listing Files in JAR File
"jar --extract" - Extracting Files from JAR File
Managing JAR Files with WinZIP
META-INF/MANIFEST.MF - JAR Manifest File
Adding META-INF/MANIFEST.MF to JAR Files
"jar -C" - Changing Input Directory
Using JAR Files in Java Class Paths
"jar --update" - Updating Class Files in JAR
"jar --main-class" - Making JAR File Executable
"jar --module-version" - Updating Module Version in JAR
jpackage - Binary Package Builder
javadoc - The Java Document Generator
jdeps - The Java Class Dependency Analyzer
jdeprscan - The Java Deprecated API Scanner
jcmd - The JVM Diagnostic Tool
jconsole - Java Monitoring and Management Console
jstat - JVM Statistics Monitoring Tool
jhsdb - The Java HotSpot Debugger
jvisualvm (Java VisualVM) - JVM Visual Tool
javap - The Java Class File Disassembler
keytool - Public Key Certificate Tool
jrunscript - Script Code Shell
native2ascii - Native-to-ASCII Encoding Converter