Table of content:
If you are using JDK 1.7, then Derby is already included in JDK installation under the name Java DB in JDK_HOME\db directory. The jar files are located in JDK_HOME\db\lib directory. In both case, you have to place appropriate jar file to the classpath:
Derby differentiates two types of JDBC driver:
So if you are planning to use everything of Derby in one machine, go
with the embedded driver. Or if the JDBC client connects to Derby server
on a remote machine, go with the network client driver.
1. Downloading Derby JDBC driver library
Download the latest version of Derby here (as of this writing, the latest release is 10.9.1.0). The distribution includes the following pieces of software component:
Component
|
Jar files
|
Embedded database engine and JDBC driver
|
derby.jar
|
Network client JDBC driver
|
derbyclient.jar
|
Network server
|
derbynet.jar, derbyrun.jar
|
Command line tools
|
derbytools.jar
|
Localization messages
|
derbyLocale_xx_YY.jar
|
- derby.jar: for embedded driver.
- derbyclient.jar: for network client driver.
2. Loading Derby JDBC drivers
Derby differentiates two types of JDBC driver:
Type of driver
|
JDBC Driver Class Name
|
Embedded driver
|
org.apache.derby.jdbc.EmbeddedDriver
|
Network client driver
| org.apache.derby.jdbc.ClientDriver |
No comments:
Post a Comment