Starting the Network Server

Note that you should always properly shut down the Network Server after use, because failure to do so might result in unpredictable side-effects, such as blocked ports on the server.

Use the startNetworkServer.bat script to start the Network Server on Windows machines and the startNetworkServer.ksh script to start the Network Server on UNIX systems. These scripts are located in $DERBY_INSTALL/frameworks/NetworkServer/bin, where $DERBY_INSTALL is the directory where you installed Derby.

You can run NetworkServerControl commands only from the host that started the Network Server.

To start the Network Server, you run the appropriate script from the command line. For example, on a Windows system, if you have installed Derby in the default directory on the C drive and you have set up your classpath correctly, type the following command:
The default system directory is the directory in which Derby was started. (See the Derby Developer's Guide for more information about the default system directory.)
Tip: You can set $DERBY_INSTALL\frameworks\NetworkServer\bin in your path to shorten the command.

By default, the Network Server will listen to requests only on the loopback address, which means that it will only accept connections from the local host.

Related concepts
The Network Server and JVMs
Accessing the Network Server by using the network client driver
Accessing the Network Server by using a DataSource
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
Related tasks
Installing required jar files and adding them to the classpath
Shutting down the Network Server
Obtaining system information
Setting port numbers