Java DB

Apache Derby

Derby Server and Administration Guide

Derby Getting Started
Derby Reference Manual
Derby Developer's Guide
Derby Performance Tuning
Derby Server and Admin Guide
Derby Tools and Utilities
Derby Server and Admin Guide
-Part one: Derby Server Guide
-Derby in a multi-user environment
-Using the Network Server with preexisting Derby applications
-The Network Server and JVMs
-Installing required jar files and adding them to the classpath
-Starting the Network Server
-Shutting down the Network Server
-Obtaining system information
-Accessing the Network Server by using the network client driver
-Accessing the Network Server by using a DataSource object
-XA and the Network Server
-Using the Derby tools with the Network Server
-Differences between running Derby in embedded mode and using the Network Server
-Setting port numbers
-Managing the Derby Network Server
-Managing the Derby Network Server remotely by using the servlet interface
-Derby Network Server advanced topics
-Derby Network Server sample programs
-Part two: Derby Administration Guide
-Checking database consistency
-Backing up and restoring databases
-Replicating databases
-Logging on a separate device
-Obtaining locking information
-Reclaiming unused space

 

Installing required jar files and adding them to the classpath

To use the Network Server and network client driver, add the following jar file to your server classpath:

  • derbyrun.jar

Adding this file to your classpath has the effect of including all of the Derby classes in your classpath. These classes are in the following jar files, which you can also add to your classpath separately:

  • derbynet.jar

    This jar file contains the Network Server code. It must be in your classpath to start the Network Server.

  • derby.jar

    This jar file contains the Derby database engine code. It must be in the classpath in order for the Network Server to access Derby databases. derby.jar is included in the Class-Path attribute of derbynet.jar's manifest file. If you have derbynet.jar in the classpath and derby.jar is in the same directory as derbynet.jar, it is not necessary to include derby.jar explicitly.

  • derbyclient.jar

    This jar file contains the Derby Network Client JDBC driver that is necessary for communication with the Network Server. It must be in the classpath of the application on the client side in order to access Derby databases over a network.

All of the jar files are in the $DERBY_HOME/lib directory.

Derby provides script files for setting the classpath to work with the Network Server. The scripts are located in the $DERBY_HOME/bin directory.

  • setNetworkClientCP.bat (Windows)
  • setNetworkClientCP (UNIX)
  • setNetworkServerCP.bat (Windows)
  • setNetworkServerCP (UNIX)
See Managing the Derby Network Server and Getting Started with Derby for more information on setting the classpath.
 

javadb@jdbcurl.com