Jens Carlberg wrote:
>
> > Does anyone have any suggestions? It seems strage to me that if I
> > change the driver name that reads
> > Class.forName("org.postgresql.Driver"), I get no errors when I compile.
[...]
> If you wan't to handle it at compile time, look up the method
> DriverManager.registerDriver(Driver driver). The driver calls this
> itself when it is loaded, so it would be extra work without any good
> effects besides that you no longer need to catch CLasNotFound but a
> SQLException. :-)
You can simply say
new org.postgresql.Driver ();
The constructor (actually the static initialization) will call
registerDriver() for you.
Ari.