Building hsqldb version 1.7.1

Building with ANT, from the Apache Jakarta Project

ANT (Another Neat Tool), from the Jakarta project, is used for building hsqldb. Thanks go out to the Apache/Jakarta and ANT teams for giving the world such a wonderful tool. Additional links to ANT info can be found on the Links Page.

Obtaining ANT

Ant is a part of the Jakarta/Apache Project.

·         Go to the Installing ANT page and follow the dirctions for your platform

Building with ANT

In /build there is an Ant build.xml that builds the hsqldb.jar. (Ant must be already installed). To use it, change to /build then type:

ant

This displays the command line options which include

ant jar

to make the hsqldb.jar

ant clean

to clean up the /classes directory that is created

ant cleanall

to remove the old jar as well

ant javadoc

to build javadoc

ant jarmain

to build a smaller jar for hsqldb that does not contain utilities

ant jartest

to build a larger jar for hsqldb that contains tests


HSQLDB can be built in any combination of four different sizes and three JRE (Java Runtime Environment) versions. The smallest jar size (hsqldbmin.jar) contains only the standalone database and JDBC support. The default size (hsqldb.jar) also contains server mode support and the utilities. The largest size (hsqldbtest.jar) includes some test classes as well.

You need the JUnit jar in the /lib directory in order to build and run the test classes.

A Jar file for HSQLDB is provided in the .zip package. This jar contains both the database and the utilities and has been built with JDK 1.3.1. If you want to run HSQLDB with JRE version 1.1.x you should rebuild the jar.

The preferred method of rebuilding the jar is with Ant. After installing Ant on your system use the following command from the /build directory: ant The command displays a list of different options for building different sizes of the HSQLDB Jar. The default is built using:

ant jar

The Ant method always builds a Jar that is compatible with the JDK that is used by Ant and specified in the JAVA_HOME environment variable. Before building the hsqldbtest.jar package, you should download the junit.jar and put it in the /lib directory, alongside servlet.jar, which is included in the .zip package.

Building with Batch Files

A set of MSDOS batch files is also provided. These produce only the default jar size. The path and classpath variables for the JDK should of course be set before running any of the batch files.

If you are compiling for JDK's other than 1.2.x or 1.3.x, you should use the appropriate switchtoJDK11.bat or switchtoJDK14.bat to adapt the source files to the target JDK before running the appropriate buildJDK11.bat or buildJDK14.bat JDK and JRE versions.

The JDK used for building the jar should generally be the same series as the target. This is because the java.sql package in each version (1.1.x 1.2.x 1.3.x 1.4.x) has a different set of methods in its public interfaces. Javadoc can be built with Ant and batch files.

fredt@users