Was this helpful?
Djar Utility
The djar utility is a tool that combines multiple files into a single archive file. It is a general-purpose archiving and compression tool, based on ZIP and the ZLIB compression format. It was designed mainly to facilitate the packaging of the various files needed to run a transformation or process into a single file for deployment purposes. The files in the archive may be signed, to help ensure their authenticity, and the entire archive may be sealed to prevent any changes being made.
The typical transformation or process consists of numerous individual files. A djar file is set up to be a package containing all of those files. The Integration Engine reads the header information on the djar and interprets whether it is for a transformation or a process.
Usage
The syntax for djar is patterned after that of Java’s jar tool, which is itself patterned after the Unix tar utility. The overall command line syntax is:
djar {tcxduslv}[vpfe0c] [zipfile] [password] [-C dir] files
This breaks down to a string consisting of one of the command characters followed by zero or more option indicators. After that string are any parameters required by the option indicators, then (where appropriate for the command) one or more files, with possibly interspersed directory change options.
Examples
djar cvfe Package.djar TextFile.process.rtc TextFile.process TextFile.process.rtc
This example creates an archive called Package.djar containing the mentioned files in the current directory. In addition, it indicates the entry point (main process) is TextFile.process.rtc.
djar cvfe Package.djar TextFile.process.rtc *.process *.proces.rtc
This example creates an archive called Package.djar containing all the files with the given extension, in the current directory. The entry point is TextFile.process.rtc.
djar cvfe Package.djar Actian_Vector/BooleanDatatype.process.rtc Actian_Vector
This example creates an archive called Package.djar containing all the files in the Actian_Vector directory. The entry point is BooleanDatatype.process.rtc (relative to current working directory).
Note:  The djar Package.djar will be created in current working directory
Note:   The password, archive file name and entry point must be provided in the same order the p, f and e flags are specified.
Commands
One of the following commands is required each time djar is run. If no commands are supplied, a usage message is printed.
Djar Command Options
Option
Description
t
Lists all the files in the djar archive. By itself only the file names are listed. If the v option is supplied, for each file name the file size, date and time are also listed.
c
Creates a new archive, which is named using the f option. At least one additional file must be supplied to put in the archive.
x
Extracts one or more files from the archive. If files are listed on the command line, only those files are extracted; otherwise all files are extracted.
d
Displays one or more files from the archive. Works like the x option, except that files are printed to standard output rather than being extracted.
u
Updates the archive with the files named on the command line. Any files that are listed and already exist in the archive, replace the existing file. Files not already in the archive are added.
s
Signs the archive. A digital signature is calculated for each file currently in the archive, and a signature added to the manifest. Then a signature for each section of the manifest is calculated, along with a signature for the overall manifest, and placed in a separate signature block file.
l
Seals the archive. In addition to being signed, the archive is encrypted, and djar allows no further modifications to the archive.
v
Verify the archive. All signatures are checked, as well as CRCs for each file.
Supported Options
The following options are supported. All options that take a parameter (except -C) must have the parameter specified in the same order as the option.
Djar Options
Option
Description
v
Enables verbose mode. Various informational messages are displayed on standard output as the program runs.
f
Use this option to specify the archive file name. Currently, this is required for all operations.
p
Use this option to specify a password to use for encrypting (when adding files) or decrypting (when extracting/displaying files).
e
Use this option to specify the package entry point file name for this archive. By specifying this, the engine can be given just the name of the djar file and is able to determine how to run the contents. This is only valid for the Create and Update commands.
0
When present, indicates that files should be added to the archive without compression. This is only valid for the Create and Update commands.
c
Indicates that when verifying an archive, certificates should not be checked. Currently djar does not add certificates when signing/sealing, consequently the absence of a certificate is not treated as an error when verifying. Additionally, even if a certificate is present (if the jarsigner utility was used), the validity of the certificate is not checked.
-C
Change directory during execution of the djar command. Files named after this option are found in the new directory referenced by –C. There may be multiple instances of –C in a single command.
Last modified date: 10/22/2024