Installing Batik
System requirements

Batik requires the following to be already installed in your system:

Java Runtime Environment

A Java 1.4 or above compatible runtime environment must be present.

Choosing a distribution to download

To install Batik, you will need to go to the download page and download one or more ZIP file containing the distribution of your choice. It is good practice to verify the integrity of the distribution files, especially if you are using one of our mirror sites. Here are the various components you will find in the download area and their intended use:

We make nightly copies of the source tree available from the Apache build server. These builds represent the current state of development and may or may not be as stable as releases. There are two types of distributions provided:

Older releases are available from the Apache archives. However, we strongly recommend using the current release of Batik.

In all cases, the user should:

Optional components

By default, the Batik source distribution comes with the Mozilla Rhino JavaScript Engine (js.jar).

To enable other scripting languages support, you will only need to install the correct jar files in lib directory of Batik and recompile your distribution.

Conversely, you can remove the js.jar of the Batik lib directory to remove JavaScript support and have a smaller distribution.

Jar file dependency graph

Note that the dependency graph in this section is out of date, and needs to be updated.

The Batik distribution comes with many jar files. Not all of them are needed in every case (although the provided applications tend to use most of them). The following is a diagram showing the dependencies between the various jar files in the Batik binary distribution (it also shows the major package interdependencies for source developers).

Jar files in white boxes are library jar files that Batik includes from external sources. The light blue boxes correspond to library jar files (those found in the lib directory of a binary distribution) built from Batik source code. The dark blue boxes represent the application jar files.

When boxes touch, the box on top depends on the box below it (there is no horizontal touching). Arrows also indicate dependencies (the source of the arrow depends on the destination). In some cases a thick underline with an arrow is used to indicate that a large number of jar files share a common dependency, this however does not indicate any dependency between the jar files underlined.

Batik jar file dependency graph
Some jar file names are shortened for clarity. All batik package references are short for org.apache.batik.

It is worth pointing out that a determined/clever programmer may be able to pare down some of these dependencies. For example the batik-dom.jar depends on xerces.jar because of the SAXDocumentFactory class in org.apache.batik.dom.util. If you didn’t need to parse XML it would be possible to ignore or break this dependency and still use the batik-dom.jar file for its DOM implementation.

Verify releases

It is essential that you verify the integrity of the downloaded files using the PGP or MD5 signatures.

The PGP signatures can be verified using PGP or GPG. First download the KEYS as well as the asc signature file for the particular distribution you choose. Make sure you get these files from the main distribution directory, rather than from a mirror. Then verify the signatures using:

pgpk -a KEYS pgpv batik-1.6.zip.asc

or

pgp -ka KEYS pgp batik-1.6.zip.asc or
gpg --import KEYS pgp batik-1.6.zip.asc

or

gpg --import KEYS gpg --verify batik-1.6.zip.asc

Alternatively, you can verify the MD5 signature on the files. A UNIX program called md5 or md5sum is included in many UNIX distributions. It is also available as part of GNU Textutils. Windows users can get binary md5 programs from here, here, or here.

We recommend using PGP signatures as they can provide a much higher level of assurance compared with MD5.