From the command line, shut down the Network Server with the following command:
java org.apache.derby.drda.NetworkServerControl shutdown [-h <hostname>][-p <portnumber>]