Re: I just can't use the org.postgresql.Driver class... Please help!

From: "Andres Olarte" <olarte(dot)andres(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: I just can't use the org.postgresql.Driver class... Please help!
Date: 2006-04-11 01:51:15
Message-ID: 3fccaa690604101851t50f291cak23c2cee3cf3b59ba@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

You must catch an Exception that *might* be thrown, in this case it's
ClassNotFoundException.

Change:

public static void main(String[] args)
{

Class.forName("org.postgresql.Driver");

}

to

public static void main(String[] args)
{
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e ){
}

}

This way it'll compile. This has nothing to do with JDBC, this is
basic Java stuff.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Wei Wei 2006-04-11 17:28:44 Calendar vs. Timestamp
Previous Message Michael Schmidt 2006-04-10 16:52:51 Re: Re; pg_dump from Java