Using the Java Command Line Tool
Although Compare provides JAVA and REST APIs which can be embedded in applications or server processes for internal or OEM applications, some evaluators may want to experiment with a simple command line process.
The file deltanova-year.x.y.z.jar included in this distribution allows the Compare differencing and recombination engines to be invoked, together with a range of input and output filters on the command line.
Note: This page outlines how to use the JAVA command line tool.
For how to use the REST API Command line tool see Testing Using Command Line Driver
Setting Up the License
Place deltanova.lic in either the product install directory or the user home directory.
The software searches both locations automatically.
For more details on Licensing, see the Licensing Overview.
General Usage Warnings
You can run deltanova-year.x.y.z.jar using a command line interface that is invoked from a Terminal window or Windows command line.
You must not move or copy these jar files once installed, as they rely on the dependencies included in the distribution. Use a relative or absolute filepath to their install locations as in the above examples.
To access version information and an informative message about available options, call the jar file and replace year.x.y.z with the year.major.minor.patch version number of your release, for example: java -jar deltanova-2026.1.0.0.jar.
Command Arguments
describe
Use this argument to get more information about a specific pipeline. It takes a single pipeline id argument. For a list of available pipeline ids, run java -jar deltanova-year.x.y.z.jar.
compare
Use this argument to perform a comparison of two input files to produce an output file. It takes a pipeline id and three file arguments. You can also include optional parameter overrides.
For more information, see Running Your First XML Comparison. You can also compare DocBook and DITA files, see Running Your First DocBook Comparison and Running Your First DITA Comparison for more details.
merge
Use this argument to perform a merge of three or more input files to produce an output file. It takes a pipeline id and n file arguments. You can also include optional parameter overrides. See Running Your First Merge Using the Command Line for more information.
check
Use this argument to perform a check of two input files to produce a report file. It takes a pipeline id, two file arguments and two mapfile arguments if using DITA files. You can also include optional parameter overrides. See Running Your First Conversion Check for more information.
JAR and Script Files
|
File |
Purpose |
|---|---|
|
|
Main Compare API classes and resources, and command line driver. |
|
|
Required for the |
|
|
Flexera licensing (required from release 8.0). |
Samples
The samples directory in the release contains:
-
XSLT filters (
samples/xsl-filters) — see Guide to Sample XSL Filters. -
DXP configuration files (
samples/compare/xml/dxp) and a DTD for DXP validity checking -
DCP XML Schema files for validation (
samples/compare/xml/dcp) -
DTCP XML Schema files for validation (
samples/compare/xml/dtcp) -
Example files for each capability
OASIS Catalog Support
As of version 2.0 of the command line comparator, you can provide a series of OASIS catalogs to be used during comparison.
In the command line processor, set the value of the xml.catalog.files property on the command line to a list of semicolon-separated catalog files, for example:
java -Dxml.catalog.files=catalogFile1;catalogFile2;...;catalogFileN -jar command-x.y.z.jar ...
In this case, the catalogFiles must be specified using either absolute paths or paths relative to the current directory.
Alternatively, use a Configuration Properties file. The benefit of this technique is that catalogs can be referenced using an absolute location, a relative location from the current directory, or a relative location from the install, home, or working directories (using ${install.dir}, ${user.home}, and ${user.dir} directories respectively).
A catalog can be used to locate/redirect XML external entities including notations and the public (or system) DOCTYPE of an XML document. It can also be used during filter processing and may be relevant when locating files referenced through document(), <xsl:import> or <xsl:include>.
Catalog support replaces the 1.3+ ability to directly set an entity or URI resolver. Additionally catalog support is available when using our Java APIs, please see our How to use a catalog resolver sample.
Extensibility
You can extend the functionality of the command line tool with your own configurations by including customised configuration files in specific directories. The configuration files must be DXP, DCP, or DTCP files (see DXP Pipeline Overview , DCP Pipeline Overview and DTCP User Guide for more information) and must be placed in one of the following directories:
-
deltanova-year.x.y.z.jarinstallation directory. -
Current working directory, i.e. the directory where the command is being invoked.
-
The user home directory (this has the highest priority).
Any DXP, DCP, or DTCP files found in these directories will be available for use as a command line tool configuration. To see which configurations are currently available, use the following command:
java -jar deltanova-year.x.y.z.jar describe