- To use the Java API, make sure you have Java SE version 8 (or later) installed. If you do not already have Java installed, you can download it from Oracle.
- DITA Merge is packaged as a zip file. Unzip this and it will contains various JARs, described below, and if you have an evaluation release there should be a license file as well. If you have purchased DITA Merge, follow the instructions in the Licensing Guide to setup your license file.
deltaxml-dita-merge-x.y.z.jaron your classpath in the same way you would with any other Java library. If you leave the JARs all together in the same directory, this will be sufficient to run DITA Merge. If you plan on moving JARs around, you may need to modify your classpath to explicitly include the others.
This JAR contains the main DITA Merge API classes and associated resources (such as Java filters).
|deltaxml.jar||DITA Merge is build on top of XML Compare and requires its JAR to work.|
This modified version of the Apache catalog resolver is needed when using catalogs through the deltaxml-dita-merge-x.y.z.jar API. Please see Catalog Resolver Customizations for further details of the modifications we have made.
|flexlm.jar and EccpressoAll.jar||These JAR files are required for the Flexera based licensing capabilities introduced in DITA Merge 2.2 and later releases. They should always be included on the classpath.|
|saxon9pe.jar, xercesImpl.jar, xml-apis.jar, icu4j.jar||These JAR files are required by the client applications and are mandatory with merge packages. They must be included on the classpath.|
2. Running a Merge
To run a concurrent merge from the Java API, it's this easy, as long as you remember to change the x_y_z version when you are using a different release:
If you're doing a three-way concurrent merge (i.e. merging two files, with a common ancestor) it's even easier with ThreeWayMerge:
Note: using the
merge(...) shortcut method doesn't set the version names. If that is necessary, use the standard
addVersion(...) methods. For more details on versions and their names see the page Specifying Merge Versions.