apache > db
Apache DB Project
Font size:      

Apache Derby: Source Code

Intended Audience

This page provides information for developers on how to check out and build the Derby source code. The official Derby releases are available on the Downloads page.

Derby source code

Derby source is stored in the Subversion (SVN) repository at Apache. For Derby web site source, see the Apache Derby Web Site page. The rest of this section describes where to get the Derby source code.

First, download and install Subversion from http://subversion.apache.org/


Currently Derby has the following branches:

  • 10.13
  • 10.12
  • 10.11
  • 10.10
  • 10.9
  • 10.8
  • 10.7
  • 10.6
  • 10.5
  • 10.4
  • 10.3
  • 10.2
  • 10.1
  • 10.0

Use the command shown below to check out the source code for a branch:

svn co https://svn.apache.org/repos/asf/db/derby/code/branches/branch/

Where branch is the number of the branch. For example, the following command checks out the source code for the 10.11 branch:

svn co https://svn.apache.org/repos/asf/db/derby/code/branches/10.11/

Development trunk

Use the command shown below to check out the development trunk:

svn checkout https://svn.apache.org/repos/asf/db/derby/code/trunk/

Production use of Derby should use official Derby releases or snapshot builds off the branches (or self built jars off the branches with bug fixes).

The development trunk (http://svn.apache.org/repos/asf/db/derby/code/trunk) is a development code line, which supports:

  • Development of new features.
  • Early access to new features for testing.

The development trunk is not suitable for production use because:

  • It contains new features that have only undergone limited testing and that may corrupt data and/or return incorrect results.
  • It may create on-disk database formats that are not upgradable to future releases of Derby. Databases created by official Derby releases will be upgradable to future versions.
The alpha version tag explicitly disables upgrade in Derby.

Software required to build Derby

Derby is designed to work in JDBC 4.1 and JDBC 4.2 environments and on Java 8 compact profile 2 (for resource-limited devices). In addition, optional run-time code may take advantage of features introduced by Java 7 and later versions of the JVM.

The software required to build the Derby mainline is summarized in the table below. However, doublecheck the BUILDING.html instructions for installation locations before downloading the software. (Note: if your browser shows HTML source for this page instead of displaying it, save the file locally with File -> Save Page As, then open the file you saved.) If you need to build an earlier version of Derby, please consult the build instructions in the appropriate code branch. For 10.4 and earlier branches, those instructions live in a file called BUILDING.txt rather than BUILDING.html.

Software Where to obtain it
Apache Ant 1.9.2 http://ant.apache.org/bindownload.cgi
Java Development Kit (JDK) release 6 or later Any Java 6 or later JDK. Java's reference implementation is at http://www.oracle.com/technetwork/java/index.html

How to build Derby

Instructions for building Derby are in a file named BUILDING.html at the root of the source code tree.

How to test Derby

Instructions for testing Derby are in the source code tree in java/testing/README.htm.

The previous link points to java/testing/README.htm in the development trunk. If you want to access the instructions in a specific branch, access the file directly by checking out the branch or the development trunk.

Also, see the tests page for test results resources.

How to submit a patch

See the Contribute Code or Documentation section in the Get Involved! page.

Last updated: August 1, 2014