Purpose: | Add, update, or delete files in a Java .JAR archive |
Format: | JAR [/= /A:[[-][+]rhsdaecjot] /A /C /D /F /Ln /M /Ne /Nt /O:[-]acdeginorstuz /P /Q /R /TEST /U /V] jararchive [@file] file... |
jararchive | The jar file to work with |
file | The files(s) to be added to the jar file |
File Selection
Supports command dialog, attribute switches, extended wildcards, ranges, multiple file names, and include lists.
File Completion Syntax:
The default filename completion syntax is: [1] dirs jar [2*] *
Usage:
After compression, the .JAR file may then be imported into Java code or executed by a JVM. The syntax is similar to the ZIP command:
Options:
/A:... | Select only those files that have the specified attribute(s) set. See Attribute Switches for information on the attributes which can follow /A:. Do not use /A: with @file lists. See @file lists for details. |
You can specify /A:= to display a dialog to help you set individual attributes.
/F | Update only those files that currently exist in the tar file, and which are older than the files on disk. |
You may use any combination of the sorting options below. If multiple options are used, the files will be sorted with the first sort option as the primary key, the next as the secondary key, and so on:
n | Sort by filename and extension, unless e is explicitly included. This is the default. |
- | Reverse the sort order for the next sort key |
a | Sort names and extensions in standard ASCII order, instead of numerically when numeric substrings are included in the name or extension. |
c | Sort by compression ratio |
d | Sort by date and time (oldest first); also see /T:acw |
e | Sort by extension |
g | Group subdirectories first, then files |
i | Sort by description |
o | Sort by owner |
r | Reverse the sort order for all options |
s | Sort by size |
t | Same as d |
u | Unsorted |
z | Same as s |
/R | If the argument is a subdirectory, copy all of the files in that subdirectory and all of its subdirectories to the tar archive. |
/TEST | Test the integrity of the TAR file (header and contents). Any errors will be displayed on STDERR. |