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:
batik- version .zip (e.g.,
The binary distribution contains compiled executable JAR files that let you get started with Batik easily. This is the recommended distribution if you want to look at Batik’s features, or you want to experiment with SVG and see the fun things you can do with Batik. The binary distribution comes with a set of sample SVG files.
batik-src- version .zip (e.g.,
The source distribution contains a complete snapshot of the Batik source code, documentation, regression tools and utilities as well as the script for building Batik. That distribution is a snapshot of the SVN repository. This is the recommended distribution for developers who want to dive into the code and understand how Batik can be integrated in their applications or how Batik can be extended.
batik-docs- version .zip (e.g.,
The documentation bundle contains a copy of the Javadoc for the Batik source code.
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:
batik-svn- date .zip (e.g.,
This contains a complete copy of the Subversion repository trunk, including support for running regard, Batik’s regression testing utility. In particular this includes all the reference images for testing. Developers are encouraged to get these or better use Subversion directly.
batik-src- date .zip (e.g.,
This contains all the source code and libraries needed to build and run Batik from source, but does not include the testing facilities.
Older releases are available from the Apache archives. However, we strongly recommend using the current release of Batik.
In all cases, the user should:
Make sure a Java Development Kit (JDK) is installed on the computer where Batik will be installed. See the system requirements. Make sure that the
javaruntime is in the
Select the directory where he/she wants to download the distribution.
Download the desired distribution from the download page.
Download the associated PGP signature (.asc) and KEYS file (preferable) or MD5 hash (.md5). This must be done directly from the Apache download area to mean anything.
Open a console and go to the directory where the distribution was downloaded.
Verify the integrity of the distribution.
Unpack the distribution with Java’s JAR utility:
unzip utility to unpack the various Batik zip files, as this would not set the directories access rights properly.
- If you are using Mac OS X, you can now generate an application bundle for Squiggle, Batik's SVG browser: sh lib/make-squiggle-app.sh After running this script, a Finder window will be opened where you can find the generated Squiggle application bundle. Drag this to your Applications folder to install it.
- Now you can follow the instructions specific to the application you want to use. For example, see the SVG Browser page or the SVG Rasterizer page for an explanation on how to use these tools.
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.
For Python, you need to download Jython distribution at http://www.jython.org/. Then you put the
jython.jarfile in the Batik
For Tcl, you need to download Jacl & TclBlend distribution at http://dev.scriptics.com/software/java/. Then you put the
tcljava.jarfiles in the Batik
Conversely, you can remove the
js.jar of the Batik
Jar file dependency graph
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.
batikpackage 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
xerces.jarbecause of the
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.jarfile for its DOM implementation.
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
pgp -ka KEYS pgp batik-1.6.zip.asc
gpg --import KEYS pgp batik-1.6.zip.asc
gpg --import KEYS gpg --verify batik-1.6.zip.asc
Alternatively, you can verify the MD5 signature on the files. A UNIX program called
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.