Installing and Configuring Batik


You need JDK 1.3 or above to use Batik. The released distributions of Batik are found at http://xml.apache.org/batik/dist. For the sake of example, let’s assume you’ll be using Batik 1.5. The distribution of Batik is contained in three zip files: batik-1.5.zip (the binary distribution), batik-docs-1.5.zip (the Javadoc documentation), and batik-src-1.5.zip (the source distribution). You should get at least the binary distribution and the Javadoc documentation in order to do development with Batik. The source distribution can be useful if you want to customize Batik, or if you want to use a source-level debugger to debug in Batik itself.

The binary distribution of Batik contains the following directories and files:

  • docs—A directory containing the Batik documentation (not including Javadoc).

  • lib—A directory containing all the jar files you might use in an application. There are more than 20 jar files in this directory.

  • samples—A directory containing sample SVG files.

  • batik.jar—A jar file that fills in the classpath with the Batik jar files.

  • batik-rasterizer.jar—The application jar file for the Batik SVG Rasterizer.

  • batik-slideshow.jar—The application jar file for the Batik SVG Slide Show application.

  • batik-squiggle.jar—The application jar file for Batik’s SVG Browser, Squiggle.

  • batik-ttf2svg.jar—The application jar file for Batik’s TrueType font to SVG Converter.

If you’re doing development, the easiest thing to do is to set your classpath to include batik.jar. Doing so includes all the Batik jar files, so it can increase the disk footprint of your application. You can use the diagram in the Batik documentation to see which jar files depend on other jar files. In order for the convenience jars like batik.jar to work, you must preserve the structure of the directory tree, because the directory tree specified in the convenience jar file is specified relative to the convenience jar. This means you need a directory called lib in the same directory as the convenience jar.

If you’re just using the Batik applications, you need to place the application/convenience jar on the classpath. The manifest of the application jar will include whichever jar files are needed from the lib directory.




Professional XML Development with Apache Tools. Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice (Wrox Professional Guides)
ISBN: 0764543555
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net