Download and Install Apache Derby
Commonly people don’t know
What is apache derby?
Derby is a relational database management system (RDBMS) which was previously known as IBM cloudscape. It was developed by Apache. It is used in java programs also supported in NetBeans. Oracle is also one of its distributors providing as javaDB, it supports embedded systems as well as Network server utilities.
Before you get Started with derby you must have JDK (Java Development Kit) installed on your machine.
If you already have JDK installed, verify JDk by writing java -version in your command prompt, this will show up JDK version.
Download and Install Derby
You can follow these steps to Download and install Derby.
- Download Derby find the version you want to install -> choose bin file from distributions -> Click on the bin file to start downloading the zip file. (20mb setup)
- Unzip the file into C:\ root so that I can be accessed easily. Rename the folder as derby so that you don’t need to write down the complete long name of the folder.
- You can also extract derby by the following commands in command prompt.
Windows (zip file)
1234mkdir C:\Apache (this will make a directory in C:\ named Apache)copy db-derby-10.12.1.1-bin.zip C:\Apachecd C:\Apacheunzip db-derby-10.12.1.1-bin.zip (unzip using extraction tool)
UNIX (tar file)1234mkdir /opt/Apache (this will make a directory in opt named Apache)cp db-derby-10.12.1.1-bin.tar.gz /opt/Apachecd /opt/Apachetar xzvf db-derby-10.12.1.1-bin.tar.gz (unzip using extraction tool)
- Now install derby by
Opening command prompt:
For Windows cmd:
C:\>set DERBY_INSTALL=C:\Apache\db-derby-10.12.1.1-bin (if you unzipped using command prompt)
C:\>set DERBY_INSTALL=C:\derby (if you unzipped manually by pasting zip file in C:\ and rename folder to derby)
For UNIX Shell:
$ export DERBY_INSTALL=/opt/Apache/db-derby-10.12.1.1-bin
- Configure Embedded derby by
There is Embedded Java Database (JDBC) and Derby Engine in derby.jar file
There are few tutorials in derbytools.jar
C:\>set CLASSPATH=C:\Apache\db-derby-10.12.1.1-bin\lib\derby.jar; Apache\db-derby-10.12.1.1-bin \lib\derbytools.jar;
C:\>set CLASSPATH= C:\derby\lib\derby.jar; derby\lib\derbytools.jar;(if you unzipped manually by pasting zip file in C:\ and renamed the folder)
$export CLASSPATH=$DERBY_INSTALL/lib/derby.jar; $DERBY_INSTALL/lib/derbytools.jar;
- Also set DERBY_HOME by
C:\>set DERBY_HOME= C:\Apache\db-derby-10.12.1.1-bin
C:\> set DERBY_HOME= C:\derby (If you renamed the folder)
Set DERBY_HOME on Mac:
- Verify the Installation through command prompt