You can use the IBM?? DB2?? Driver for JDBC instead of the Derby network client driver to connect to the Network Server.
com.ibm.db2.jcc.DB2DriverYou must have the following two jar files present in your classpath in order to use the DB2 Driver for JDBC:
The syntax of the URL that is required to access the Network Server is:
jdbc:derby:net://<server>[:<port>]/
<databaseName>[;<Derby URL attribute>=<value> [;...]]
[:<Universal Driver attribute>=<value>; [...;]]
After you specify the database name and attributes, you can include attributes for the DB2 Driver for JDBC. You must include a semicolon after the last DB2 Driver for JDBC attribute.
Optional database connection URL attributes that are supported by the DB2 Driver for JDBC.
The DB2 Driver for JDBC requires that you set the user and password attributes to non-null values.
The following DB2 Driver for JDBC attributes are available to you when running the Network Server:
User name (required by the DB2 Driver for JDBC).
User password (required by the DB2 Driver for JDBC).
The TCP/IP port number where the Network Server listens for connection requests to this data source. The default is 1527.
Displays error messages from the server.
Creates a read-only connection. The default is false.
A character output stream. All logging and tracing messages print to the logWriter property.
Specifies the granularity of tracing messages to the logWriter property.
Provides an explicit file location for the trace output.
Indicates what type of security mechanism is used.
Controls when prepared statements are physically prepared in the database server. The default value is true.
The Derby Network Server is compatible with the DB2 Driver for JDBC release 2.4 and higher.