Building the jar file
This page describes the necessary step to build SQL Workbench/J from the source distribution.
The source distribution does not contain all needed libraries. If you want to build SQL Workbench/J yourself it is highly recommended to check out the Subversion repository to automatically get everything you need.
If you do not want to check out the Subversion repository, you need to unzip the source archive into a directory of your choice. This directory will be referenced as ${wbroot} in this description.
To prepare your environment to build SQL Workbench/J from source you will need to
- Download and install a Java6 JDK. The Java runtime (JRE) does not contain a compiler, therefor the JDK is required.
- Download and install Ant 1.7 (or later) from http://ant.apache.org

-
Download the JarBundler Ant task
. As the jarbundler library is referenced from within build.xml,
the jar file is needed even when you don't want to build the Mac release. Then copy the
files jarbundler-2.1.0.jar and JavaApplicationStub to ${wbroot}/libs/jarbundler.
- Download Apache POI from http://poi.apache.org
unzip the distribution to ${wbroot}/libs/poi - Download the ODF Simple libraries from http://incubator.apache.org
copy all jar files to ${wbroot}/libs/odf - Download Apache Log4J 1.2.x from http://logging.apache.org/log4j/
and copy the jar file into the directory ${wbroot}/libs/log4j - Download the Postgres JDBC driver from http://jdbc.postgresql.org/download.html
and copy the jar file into ${wbroot}/junit (Not needed if you get everything from the SVN repository) - Download HSQLDB from http://www.hsqldb.org
(Required to run the JUnit test. Not needed if you get everything from the SVN repository) - Download H2 Database from http://www.h2database.com
(Required to run the JUnit test. Not needed if you get everything from the SVN repository) - Download the Jemmy library from http://java.net/projects/jemmy
(Required to run the GUI tests. Not needed if you get everything from the SVN repository) - Copy the files hsqldb.jar, h2.jar and jemmy.jar into ${wbroot}/junit (Not needed if you get everything from the SVN repository)
Now you can build the jar file by typing ant while the scripts directory is your current directory. If the build is successful, ${wbroot}/dist/sqlworkbench.jar will be created.
The default Ant target make-dev-jar does not build the manual.
Building the manual
To build the manual you need to download Docbook XSL
package
(Version 1.72 or later) and FOP
(Version 0.95 or later).
- Copy the Docbook distribution to ${wbroot}/etc/docbook
- Copy the FOP distribution to ${wbroot}/etc/fop
Now you can build the PDF manual by typing ant pdf or HTML manual by typing ant publish-dev.