Name
jar
Synopsis
jar [options
] [manifest
]dest files
Java archive tool. All the named objects and directory trees
(if directories are given) are combined into a single Java
archive, presumably for downloading. jar is based on the ZIP and ZLIB
compression formats; zip and
unzip can process .jar
files with no trouble. If a
manifest is not provided, jar creates one automatically. The
manifest becomes the first entry in the archive, and it contains
any needed metadata about the archive.
Usage is similar to tar,
in that the leading -
may be
omitted from the options. jar
is an excellent tool for creating and for opening ZIP format
files; its usage is much more intuitive for the long-time Unix
user already familiar with tar.
Options
-
-0
Do not use ZIP compression when creating the archive.
-
-c
Create a new or empty archive to standard output.
-
-C
directory
Change to directory before processing the filenames that follow. Multiple
-C
options are allowed.-
-f
The second argument, dest, is the archive to process.
-
-i
Create index information for the
.jar
file and the ones it depends upon. Include a file named INDEX.LIST in the archive which lists location information for each package in the.jar
file and all the.jar
files in theClass-Path
attribute of the file.-
-J
java-option
Pass java-option on to the java program. Useful for changing the execution environment or memory usage. java-option should not contain spaces; use multiple
-J
options if necessary.-
-m
Use specified manifest instead of creating ...
Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.