319 lines
9.9 KiB
HTML
319 lines
9.9 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||
|
<meta http-equiv="Content-Type" content=
|
||
|
"text/html; charset=utf-8">
|
||
|
<title>ajar - Alternative Java archive</title>
|
||
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</HEAD>
|
||
|
<body bgcolor="#FFFFFF">
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>ajar - Alternative Java<SUP>(TM)</SUP> archive</h2>
|
||
|
|
||
|
<strong>Synopsis</strong>
|
||
|
|
||
|
<p><strong>ajar {-h | --help}</strong></p>
|
||
|
|
||
|
<p><strong>ajar {-l | --list} [-v | --verbose] [-q |
|
||
|
--quiet]</strong> <em>jarfile</em> <strong>[</strong>{<em>file</em>
|
||
|
| <em>pattern</em>} ...<strong>] [{-x | -i}</strong> {<em>file</em>
|
||
|
| <em>pattern</em>} ...<strong>] ...</strong></p>
|
||
|
|
||
|
<p><strong>ajar {-x | --extract} [-v | --verbose] [-q | --quiet]
|
||
|
[-N | --neverWrite] [-p | --pipe]</strong> <em>jarfile</em>
|
||
|
<strong>[</strong>{<em>file</em> | <em>pattern</em>} ... <strong>
|
||
|
]<br>
|
||
|
[{-x | -i}</strong> {<em>file</em> | <em>pattern</em>}
|
||
|
...<strong>] ...</strong></p>
|
||
|
|
||
|
<p><strong>ajar {-c | --create} [-0 | --store-only] [-v |
|
||
|
--verbose] [-r | --recurse] [-@ | --stdin] [-D | --nodirs] [-q |
|
||
|
--quiet]</strong><br>
|
||
|
<strong>[{-m | --manifest}</strong> <em>mffile</em><strong>] [-M |
|
||
|
--no-manifest] [{-n | --no-deflate}</strong> <em>
|
||
|
suffix..</em><strong>]</strong> <em>jarfile file ...</em> <strong>
|
||
|
[{-x | -i}</strong> {<em>file</em> | <em>pattern</em>} ...<strong>]
|
||
|
...</strong></p>
|
||
|
|
||
|
<p><strong>ajar {-a | --add} [-0 | --store-only] [-v | --verbose]
|
||
|
[-r | --recurse] [-@ | --stdin] [-D | --nodirs] [-q |
|
||
|
--quiet]</strong><br>
|
||
|
<strong>[{-m | --manifest}</strong> <em>mffile</em><strong>] [-M |
|
||
|
--no-manifest] [{-n | --no-deflate}</strong> <em>
|
||
|
suffix..</em><strong>]</strong> <em>jarfile file ...</em> <strong>
|
||
|
[{-x | -i}</strong> {<em>file</em> | <em>pattern</em>} ...<strong>]
|
||
|
...</strong></p>
|
||
|
|
||
|
<p><strong>ajar {-d | --delete} [-v | --verbose] [-q |
|
||
|
--quiet]</strong> <strong>[{-m | --manifest}</strong> <em>
|
||
|
mffile</em><strong>] [-M | --no-manifest]</strong> <em>jarfile</em>
|
||
|
{<em>file</em> | <em>pattern</em>} <em>...</em> <strong>[{-x |
|
||
|
-i}</strong> {<em>file</em> | <em>pattern</em>} ...<strong>]
|
||
|
...</strong></p>
|
||
|
|
||
|
<p><strong>Description</strong></p>
|
||
|
|
||
|
<p><strong>ajar</strong> may be used as an alternative interface
|
||
|
for creating and manipulating Java<sup>tm</sup> Archive (JAR)
|
||
|
files. The <strong>ajar</strong> utility combines several of the
|
||
|
features found in zip/unzip tools with those of the IBM<SUP>(R)</SUP>
|
||
|
Developer Kit for Java <strong>jar</strong> tool. Use <strong>ajar</strong>
|
||
|
instead of the jar command when you need a zip or unzip like
|
||
|
interface.</p>
|
||
|
|
||
|
<p>Like the <strong>jar</strong> tool, <strong>ajar</strong> lists
|
||
|
the contents of jar files, extracts from jar files, creates new jar
|
||
|
files and supports many of the zip formats.. Additionally, <strong>
|
||
|
ajar</strong> supports adding and deleting files in existing
|
||
|
jars.</p>
|
||
|
|
||
|
<p><strong>Actions</strong></p>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>-h | --help</strong></dt>
|
||
|
|
||
|
<dd>Writes command syntax to stdout.</dd>
|
||
|
|
||
|
<dt><strong>-l | --list</strong></dt>
|
||
|
|
||
|
<dd>Writes table of contents to stdout.</dd>
|
||
|
|
||
|
<dt><strong>-x | --extract</strong></dt>
|
||
|
|
||
|
<dd>Extracts files to the current directory.</dd>
|
||
|
|
||
|
<dt><strong>-c | --create</strong></dt>
|
||
|
|
||
|
<dd>Creates a new archive.</dd>
|
||
|
|
||
|
<dt><strong>-a | --add</strong></dt>
|
||
|
|
||
|
<dd>Adds new files to the archive and replaces existing files.</dd>
|
||
|
|
||
|
<dt><strong>-d | --delete</strong></dt>
|
||
|
|
||
|
<dd>Deletes files from the archive.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<p><strong>Options</strong></p>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>-@ | --stdin</strong></dt>
|
||
|
|
||
|
<dd>Read file list from stdin. The file list consists of parameters
|
||
|
that would normally follow the <em>jarfile</em> parameter on the
|
||
|
command line. The file list may consist of multiple lines with one
|
||
|
item per line and no leading blanks. Comments begin with '#' and
|
||
|
extend to the end of the line.</dd>
|
||
|
|
||
|
<dt><strong>-0 | --store-only</strong></dt>
|
||
|
|
||
|
<dd>Store only. Do not compress/deflate files. Used when adding
|
||
|
files and creating jars.</dd>
|
||
|
|
||
|
<dt><strong>-m | --manifest</strong></dt>
|
||
|
|
||
|
<dd>Include manifest information from the specified file.</dd>
|
||
|
|
||
|
<dt><strong>-n | --no-deflate</strong></dt>
|
||
|
|
||
|
<dd>Do not deflate files with the specified suffixes. The list of
|
||
|
suffixes must be terminated by another option or "--". See examples
|
||
|
below.</dd>
|
||
|
|
||
|
<dt><strong>-p | --pipe</strong></dt>
|
||
|
|
||
|
<dd>Extract to stdout.</dd>
|
||
|
|
||
|
<dt><strong>-q | --quiet</strong></dt>
|
||
|
|
||
|
<dd>Quiet mode. Do not write informational and warning
|
||
|
messages.</dd>
|
||
|
|
||
|
<dt><strong>-r | --recurse</strong></dt>
|
||
|
|
||
|
<dd>Recurse into directories. Used when adding files and creating
|
||
|
jars.</dd>
|
||
|
|
||
|
<dt><strong>-v | --verbose</strong></dt>
|
||
|
|
||
|
<dd>Verbose mode. Write diagnostic information to stderr.</dd>
|
||
|
|
||
|
<dt><strong>-D | --nodirs</strong></dt>
|
||
|
|
||
|
<dd>Suppress directory entries. Used when adding files and creating
|
||
|
jars.</dd>
|
||
|
|
||
|
<dt><strong>-M | --no-manifest</strong></dt>
|
||
|
|
||
|
<dd>Do not create a manifest.</dd>
|
||
|
|
||
|
<dt><strong>-N | --neverWrite</strong></dt>
|
||
|
|
||
|
<dd>Never overwrite any files when extracting.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<p><strong>Operands</strong></p>
|
||
|
|
||
|
<p>The <em>jarfile</em> operand specifies the pathname of the jar
|
||
|
file being operated on. <em>jarfile</em> must be an Integrated File
|
||
|
System (IFS) name.</p>
|
||
|
|
||
|
<p>The <em>file</em> operand specifies the pathname of a file or
|
||
|
directory. <em>file</em> must be an IFS name.</p>
|
||
|
|
||
|
<p>The <em>pattern</em> operand specifies a pattern to match
|
||
|
pathnames of files and directories. <em>pattern</em> will match to
|
||
|
IFS names. A <em>pattern</em> is a sequence of characters
|
||
|
containing one or more of the following meta characters:</p>
|
||
|
|
||
|
<dl>
|
||
|
<dt>*</dt>
|
||
|
|
||
|
<dd>matches 0 or more characters</dd>
|
||
|
|
||
|
<dt>?</dt>
|
||
|
|
||
|
<dd>matches any single character</dd>
|
||
|
|
||
|
<dt>[...]</dt>
|
||
|
|
||
|
<dd>matches any single character found within the brackets where
|
||
|
"..." represents a set of characters. Ranges are specified by a
|
||
|
beginning character, a hyphen, and an ending character. A
|
||
|
exclamation ('!') or carrot ('^') following the left bracket means
|
||
|
the characters within the brackets are complemented (match anything
|
||
|
except the characters within the brackets).</dd>
|
||
|
</dl>
|
||
|
|
||
|
<p>Patterns must be contained within quotation marks or the meta characters
|
||
|
must be preceded by a back slash ('\') to prevent Qshell from
|
||
|
interpreting them.</p>
|
||
|
|
||
|
<p>The <em>file</em> and <em>pattern</em> operands are used to
|
||
|
select the files to be acted upon. Selected files are determined
|
||
|
using three sets of files, a candidate set, an exclusion set, and
|
||
|
an inclusion set.</p>
|
||
|
|
||
|
<dl>
|
||
|
<dt>candidate set</dt>
|
||
|
|
||
|
<dd>The candidate set is determined using the operands listed after
|
||
|
<em>jarfile</em> and before any -x or -i. For the list and extract
|
||
|
actions the candidate set defaults to all files contained in the
|
||
|
jar file. For all other actions there is no default value for the
|
||
|
candidate set.</dd>
|
||
|
|
||
|
<dt>exclusion set</dt>
|
||
|
|
||
|
<dd>The exclusion set is determined using all lists of <em>
|
||
|
file</em> and <em>pattern</em> operands preceded by a -x and
|
||
|
followed by another -x, a -i or the end of the command string. The
|
||
|
exclusion set defaults to the empty set.</dd>
|
||
|
|
||
|
<dt>inclusion set</dt>
|
||
|
|
||
|
<dd>The inclusion set is determined using all lists of <em>
|
||
|
file</em> and <em>pattern</em> operands preceded by a -i and
|
||
|
followed by another -i, a -x or the end of the command string. The
|
||
|
inclusion set defaults to all files in the candidate set.</dd>
|
||
|
</dl>
|
||
|
|
||
|
<p>All candidate files are selected that are in the inclusion set
|
||
|
and not in the exclusion set.</p>
|
||
|
|
||
|
<p><strong>Exit Status</strong></p>
|
||
|
|
||
|
<ul>
|
||
|
<li>0 when all files were processed successfully</li>
|
||
|
|
||
|
<li>>0 when an error occurred</li>
|
||
|
</ul>
|
||
|
|
||
|
<strong>Examples</strong>
|
||
|
|
||
|
<ol>
|
||
|
<li>To list all files in a jar file named myjar which is located in
|
||
|
the current directory: ajar -l myjar</li>
|
||
|
|
||
|
<li>To list all .java files in myjar: ajar -l myjar \*.java</li>
|
||
|
|
||
|
<li>To extract all files from myjar into the current directory:
|
||
|
ajar -x myjar</li>
|
||
|
|
||
|
<li>To create a jar named myjar containing all directories and
|
||
|
files in the file system hierarchy rooted in the current directory
|
||
|
(Note in this example Qshell interprets the '*' and expands it so
|
||
|
that the list of candidate files contains all files and directories
|
||
|
in the current directory.): ajar -c -r myjar *</li>
|
||
|
|
||
|
<li>To create a jar named myjar containing entries for only the
|
||
|
files in the current directory: ajar -c -D myjar *</li>
|
||
|
|
||
|
<li>To create the same jar file without a manifest (which is
|
||
|
a zip file for all practical purposes): ajar -c -D -M myjar *
|
||
|
<!-- Using -x --></li>
|
||
|
|
||
|
<li>To create a jar named myjar containing all files except .java
|
||
|
files in the file system hierarchy rooted in the current directory:
|
||
|
ajar -c -r myjar * -x \*.java <!-- Using -i --></li>
|
||
|
|
||
|
<li>To create a jar named myjar containing only the .class files in
|
||
|
a file system hierarchy rooted in the current directory: ajar -c -r
|
||
|
myjar * -i \*.class <!--Using ==nno-deflate--></li>
|
||
|
|
||
|
<li>To create a jar named myjar without deflating the .java files:
|
||
|
ajar -c -r -n java -- myjar * <!-- Using ==sstdin --></li>
|
||
|
|
||
|
<li>To create a jar named myjar while reading the file list from
|
||
|
stdin: ajar -@ -c -r myjar
|
||
|
|
||
|
<p>Sample stdin data:</p>
|
||
|
|
||
|
<pre>
|
||
|
docs
|
||
|
source
|
||
|
classes
|
||
|
-x
|
||
|
docs/foo/*
|
||
|
</pre>
|
||
|
|
||
|
<!-- Adding/changing a member --></li>
|
||
|
|
||
|
<li>To add a file named bar to a jar named myjar: ajar -a myjar bar
|
||
|
<!-- Deleting a member --></li>
|
||
|
|
||
|
<li>To delete a file named foo/bar from a jar named myjar: ajar -d
|
||
|
myjar foo/bar</li>
|
||
|
</ol>
|
||
|
|
||
|
<strong>Notes</strong>
|
||
|
|
||
|
<ol>
|
||
|
<li>Short options can be clustered (for example, -c -v -D is the same as
|
||
|
-cvD). Long options (--create, --verbose, --nodirs, ..., and so on.) can
|
||
|
be abbreviated as long as the abbreviations are unique.</li>
|
||
|
|
||
|
<li>File names can be changed when creating a jar or adding a file
|
||
|
to a jar. For example, "ajar -c x.jar bin/foo : bin/bar" creates
|
||
|
the jar file x.jar from the file bin/foo with a single entry,
|
||
|
bin/bar. This can also be done using stdin, "ajar -c@ x.jar", where
|
||
|
stdin contains:
|
||
|
|
||
|
<pre>
|
||
|
bin/foo : bin/bar
|
||
|
</pre>
|
||
|
</li>
|
||
|
|
||
|
<li>Use of <strong>ajar</strong> requires the QIBM_MULTI_THREADED
|
||
|
environment variable must be set to 'Y'.</li>
|
||
|
</ol>
|
||
|
</body>
|
||
|
</html>
|
||
|
|