Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

17.2.1 Registering the Driver class

The procedure for registering the JDBC driver into the Java Virtual Machine is described below.

The driver name that must be used to register the Driver class into the Java Virtual Machine is package-name.class-name. The package and class names of the JDBC driver are as follows:

Package name: JP.co.Hitachi.soft.HiRDB.JDBC

Class name: HiRDBDriver
Organization of this subsection
(1) Registering using the forName method of the Class class
(2) Registering in the system properties
(3) Registering into the operation setup file of the Java Virtual machine (Applet)

(1) Registering using the forName method of the Class class

Call the forName method of the Class class from within the application as follows:

 
  Class.forName("JP.co.Hitachi.soft.HiRDB.JDBC.HiRDBDriver");
 

(2) Registering in the system properties

Set the following value in the jdbc.drivers system property of the Java Virtual Machine:

 
  System.setProperty("jdbc.drivers", "JP.co.Hitachi.soft.HiRDB.JDBC.HiRDBDriver");
 

(3) Registering into the operation setup file of the Java Virtual machine (Applet)

Specify in the [JAVA_HOME]\.hotjava\properties file the information shown below (the value of [JAVA_HOME] depends on the Java execution environment). If you register multiple JDBC drivers, delimit them with colons (:).

 
  jdbc.drivers="JP.co.Hitachi.soft.HiRDB.JDBC.HiRDBDriver"