Loading EDB JDBC Connector v42.5.1.2

The EDB Postgres Advanced Server JDBC driver is written in Java and is distributed in the form of a compiled Java Archive (JAR) file. Use the Class.forName() method to load the driver. The forName() method dynamically loads a Java class at runtime. When an application calls the forName() method, the Java Virtual Machine (JVM) attempts to find the compiled form (the bytecode) that implements the requested class.

The EDB Postgres Advanced Server JDBC driver is named com.edb.Driver:

Class.forName("com.edb.Driver");

After loading the bytecode for the driver, the driver registers itself with another JDBC class (named DriverManager) that's responsible for managing all the JDBC drivers installed on the current system.

If the JVM can't locate the named driver, it reports a ClassNotFound exception (which is intercepted with a catch block near the end of the program). The DriverManager is designed to handle multiple JDBC driver objects. You can write a Java application that connects to more than one database system by way of JDBC.