Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Early JDBC driver load?



Hi

I'm using postgresql-8.3-604.jdbc3.jar driver

I have a very simple java program to inspect what drivers are initially
loaded:

import java.sql.DriverManager;

public class ListDrivers {

        java.util.Enumeration myDrivers = DriverManager.getDrivers();
        while (myDrivers.hasMoreElements()){
                 System.out.println(myDrivers.nextElement());
          }
    }
}

When I run it using:

java -cp .;postgresql-8.3-604.jdbc3.jar ListDrivers

It returns

sun(dot)jdbc(dot)odbc(dot)JdbcOdbcDriver(at)3cb89838
org(dot)postgresql(dot)Driver(at)b815859

Note that I have not loaded the driver using the typical classForName
neither the java -Djdbc option

Why postgres driver is loaded only by including the jar file in the
classpath?

Thanks

Jesus


Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group