Skip to main content

030002. Install Derby database in Windows (DELETE)


What you’ll need

  • About 30 minutes
  • JDK 1.8 or later

Install Apache derby


First you have to download Derby Unzip the file for intance on :\db-derby-10.14.1.0-bin.

As convention name all folder db<namedabatase>-version if possible.

Environment variables


echo %DERBY_INSTALL%
D:\db-derby-10.14.1.0-bin
echo %DERBY_HOME%
D:\db-derby-10.14.1.0-bin
echo %CLASSPATH%
D:\db-derby-10.14.1.0-bin\lib\derby.jar;D:\db-derby-10.14.1.0-bin\lib\derbytools.jar;

Testing the installation

java org.apache.derby.tools.sysinfo

Create the first databases

IJ is the client from the comand line.

java org.apache.derby.tools.ij
ij version 10.14
ij> connect 'jdbc:derby:MyFirsDB;create=true' user 'user1' password 'password1'

Install Database client

Reference: Squirrel SQL client

 The Derby Network server should be used in environments where multiple JVMs are connecting to a single Derby database. In the context of using SQuirreL to browse a Derby database this configuration is required if other users will be connecting to the same database via other clients, for instance, ij or some other application.

This is the command to start the network server on my host with derbynet.jar in my CLASSPATH.
java org.apache.derby.drda.NetworkServerControl start

Comments