From: Jesus Maudes <jmaudes@ubu.es>
To: pgsql-jdbc@postgresql.org
Subject: Early JDBC driver load?
Date: Thu, 26 Feb 2009 01:05:22 +0100
Message-ID: <48cb7eaf0902251605k28e1ed66n79baede3781cf31f@mail.gmail.com> (raw)
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.jdbc.odbc.JdbcOdbcDriver@3cb89838
org.postgresql.Driver@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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: jmaudes@ubu.es
Subject: Re: Early JDBC driver load?
In-Reply-To: <48cb7eaf0902251605k28e1ed66n79baede3781cf31f@mail.gmail.com>
References: <48cb7eaf0902251605k28e1ed66n79baede3781cf31f@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox