∟Downloading and Installing Derby (Java DB)

This section describes how to download and install Derby database server 10.17 - free for evaluation.

Derby is a relational database management system that is based on the Java programming language and SQL. Derby is a commercial release of the Apache Software Foundation's (ASF) open source relational database project. But you can still download a copy of Derby free for evaluation. The Apache project is called Derby.

If you want to install the latest version of Derby, you can follow this tutorial:

1. Go to Apache Derby Website at https://db.apache.org/derby/.

2. Click "Download" from the menu. You see the list of Derby versions for downloading.

3. Click "10.17.1.0" to see the download option page.

4. Click "db-derby-10.17.1.0-bin.zip" to download the binary package in ZIP format, which is good for Windows, Linux and macOS systems.

5. Unzip the download file in a local directory like %HOME%\local\derby or $HOME/local/derby depending your system platform. All installed files will be in the "db-derby-10.17.1.0-bin" sub-directory.

6. Look at installed files:

(on Windows systems)
herong> dir %HOME%\local\derby\db-derby-10.15.1.3-bin

(on Linux or macOS systems)
herong$ ls -l $HOME/local/derby/db-derby-10.15.1.3-bin

47124   KEYS
11560   LICENSE
15609   NOTICE
 6595   RELEASE-NOTES.html
(dir)   bin
(dir)   demo
(dir)   docs
 5026   index.html
(dir)   javadoc
(dir)   lib
(dir)   test

7. Setting environment variables to help running Derby. For example:

(on Windows systems)
herong> set JAVA_HOME=C:\Program Files\Java\jdk-12.0.1
herong> set DERBY_HOME=%HOME%\local\db-derby-10.15.1.3-bin

(on CentOS Linux systems)
herong$ export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.i386
herong$ export DERBY_HOME=$HOME/local/db-derby-10.15.1.3-bin

(on macOS systems)
$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home
$ export DERBY_HOME=$HOME/local/db-derby-10.17.1.0-bin

Cool. I have Derby 10.17 installed on my local system and ready to use!

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

►Installing and Running Derby (Java DB)

►Downloading and Installing Derby (Java DB)

 Derby (Java DB) in the JDK 1.8 Package

 Downloading Derby (Java DB) Documents

 "sysinfo" - Checking Derby (Java DB) Installation

 Setting Up Derby (Java DB) in Network Server

 "ij" - Client Tool to Create New Databases

 Derby (Java DB) JDBC Driver

 Derby (Java DB) JDBC DataSource Objects

 Derby (Java DB) - DML Statements

 Derby (Java DB) - ResultSet Objects of Queries

 Derby (Java DB) - PreparedStatement

 Summary of JDBC Drivers and Database Servers

 Using Connection Pool with JDBC

 Archived Tutorials

 References

 Index

 Full Version in PDF/EPUB