Thread: jdbc examples

jdbc examples

From
Cyril FERRAND
Date:
Hello

    I have compiled JDBC interface with JDK1.1.3. But I try to run
examples but I Cant, I have :

PostgreSQL basic test v6.3 rev 1

Exception caught.
java.lang.ClassNotFoundException: postgresql.Driver
java.lang.ClassNotFoundException: postgresql.Driver
        at example.monbasic.<init>(monbasic.java:20)
        at example.monbasic.main(monbasic.java:67)

???

thanks for your answer

Cyril



--
*************************************************************************
*       Cyril Ferrand : mailto:cyril.ferrand@sophia.inria.fr            *
*            http://www.mygale.org/05/ironmask                          *
*************************************************************************




Re: [INTERFACES] jdbc examples

From
Herouth Maoz
Date:
At 15:00 +0300 on 8/7/98, Cyril FERRAND wrote:


> PostgreSQL basic test v6.3 rev 1
>
> Exception caught.
> java.lang.ClassNotFoundException: postgresql.Driver
> java.lang.ClassNotFoundException: postgresql.Driver
>         at example.monbasic.<init>(monbasic.java:20)
>         at example.monbasic.main(monbasic.java:67)

I think you don't have the postgresql.jar archive in your classpath. You
should have the jar itself, not just its directory, as part of the
CLASSPATH variable.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



Re: [INTERFACES] jdbc examples

From
Peter T Mount
Date:
On Wed, 8 Jul 1998, Herouth Maoz wrote:

> At 15:00 +0300 on 8/7/98, Cyril FERRAND wrote:
>
>
> > PostgreSQL basic test v6.3 rev 1
> >
> > Exception caught.
> > java.lang.ClassNotFoundException: postgresql.Driver
> > java.lang.ClassNotFoundException: postgresql.Driver
> >         at example.monbasic.<init>(monbasic.java:20)
> >         at example.monbasic.main(monbasic.java:67)
>
> I think you don't have the postgresql.jar archive in your classpath. You
> should have the jar itself, not just its directory, as part of the
> CLASSPATH variable.

Yes, ideally, only the jar file should be included in the classpath.

If the extracted class files were used, then the parent directory of the
postgresql directory needs to be in the classpath.

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk