Project

General

Profile

How to run Java DB Derby » History » Version 2

Henning Blohm, 21.09.2012 23:59

1 1 Henning Blohm
h2. Running a Java DB Network Server
2
3
In samples we use the Java DB, i.e. the SQL database implementation that comes with the Java SE Development Kit (JDK).
4
5
For general information see here: http://docs.oracle.com/javadb/10.8.2.2/getstart/index.html
6
7
To run the Java DB in server mode, which is what we want to do, run
8
9
<pre><code class="ruby">
10
mkdir derby
11
cd derby
12
java -jar $JAVA_HOME/db/lib/derbyrun.jar server start
13
</code></pre>
14
15
assuming you want to run it in the folder *derby*. At a second time you can omit the "mkdir" command of course. The environment variable JAVA_HOME is expected to point to your JDK installation folder.
16
17
On Windows run
18
19
<pre><code class="ruby">
20
mkdir derby
21
cd derby
22
java -jar %JAVA_HOME%\db\lib\derbyrun.jar server start
23
</code></pre>
24
25 2 Henning Blohm
In order to interactively query Java DB, we recommand to use the Data Source Explorer view in Eclipse. But any SQL client that can make use of JDBC drivers should be fine. The driver for Java DB can be found (at the time of this writing) in *$JAVA_HOME/db/lib/derbyclient.jar* (and similarly on Windows).