Re: PROBLEM WITH DRIVER LOAD - Mailing list pgsql-jdbc

From Guillaume Cottenceau
Subject Re: PROBLEM WITH DRIVER LOAD
Date
Msg-id 878xtd35tx.fsf@meuh.mnc.lan
Whole thread Raw
In response to PROBLEM WITH DRIVER LOAD  (Wagner <wagner.and@gmail.com>)
List pgsql-jdbc
Wagner <wagner.and 'at' gmail.com> writes:

> Hi, i'm new in jdbc and
> my problem is, the driver doesn't load,
> the code is:
>
> public static void connect(){
>         try{
>             Class.forName("org.postgresql.Driver");
>         }catch(ClassNotFoundException cnfex){
>             System.err.println("driver load fail");
>
> //the problem is here, i don't know what library i need and what i need to
> do with the classpath to this works,

As documented in multiple places, you have to put the
postgresql.jar in your classpath. This depends on your java
environment, but generally you can achieve this by using the
"-cp" argument to the "java" program you invoke.

--
Guillaume Cottenceau

pgsql-jdbc by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: [PPOSTGRES][PSQL] Segmentation fault
Next
From: Sarvjot Kaur
Date:
Subject: Need help in installing postgresql 8.1.2 on Windows