Project

General

Profile

How to run Java DB Derby » History » Version 28

Henning Blohm, 19.06.2018 22:48

1 1 Henning Blohm
h2. Running a Java DB Network Server
2
3 28 Henning Blohm
Previously to Java 9, the Java SE Development Kit (JDK) by Oracle provided the Java DB - essentially the same as the Apache Derby DB. That is not the case anymore. However, we use that Database implementation in our samples. In order to run those samples that illustrate use of a relational database, please follow the instructions below to install and run Apache Derby. Could hardly be simpler.
4 1 Henning Blohm
5 28 Henning Blohm
h3. Step 1: Download and Install
6 3 Henning Blohm
7 28 Henning Blohm
Unless you have done so already, download "Apache Derby DB":http://db.apache.org/derby and follow the "installation how-to":http://db.apache.org/derby/papers/DerbyTut/install_software.html.
8 1 Henning Blohm
9 28 Henning Blohm
Note: You do not need to unpack Apache Derby into some global folder on your system. Instead you may want to use some local folder under your user's home folder. There is no problem installing and runnning different instances and configurations at any time.
10 1 Henning Blohm
11 28 Henning Blohm
h3. Step 2: Run
12
13
Let's assume you installed (well - unpacked) into a folder $DERBY_INSTALL. Also, let's assume some Java Runtime Environment is installed and ready.
14
15
Simply run the following on Linux or Mac OS:
16
17 1 Henning Blohm
<pre><code class="ruby">
18 28 Henning Blohm
cd $DERBY_INSTALL
19
java -jar lib/derbyrun.jar server start
20 27 Henning Blohm
</code></pre>
21 16 Udo Offermann
22 23 Udo Offermann
On Windows run
23 20 Udo Offermann
24 16 Udo Offermann
<pre><code class="ruby">
25 28 Henning Blohm
cd %DERBY_INSTALL
26
java -jar lib\derbyrun.jar server start
27 16 Udo Offermann
</code></pre>
28
29 1 Henning Blohm
30 28 Henning Blohm
That's it. Apache Derby will be waiting for connections on port 1527.