JDBC Tutorials - Herong's Tutorial Examples - v3.13, by Herong Yang
Setting Up Derby (Java DB) in Network Server
This section describes how to set up and run Derby in Network Server mode listening client connections over the network.
Derby can be used in two modes:
I want to try the Network Server mode first. Here is what I did to setup Derby and start it in Network Server mode. Open a command line window and run the following commands:
herong> cd local herong> mkdir javadb herong> cd javadb (on Windows) herong> %DERBY_HOME%\bin\startnetworkserver (on Linux or macOS) herong> $DERBY_HOME/bin/startnetworkserver ... : Apache Derby Network Server - 10.17.1.0 - (1913217) started and ready to accept connections on port 1527
Cool. My Derby is up and running in Network Server mode on host "localhost" and listening connections on port "1527".
Note that I created a new sub-directory in my own "local" directory and started Derby from there. This sub-directory will become the Derby database home directory. Any new databases created on Derby server will be located in this sub-directory.
Table of Contents
JDBC (Java Database Connectivity) Introduction
►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 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