From: Guillaume Cottenceau <gc@mnc.ch>
To: Wagner <wagner.and@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PROBLEM WITH DRIVER LOAD
Date: 18 Jan 2006 16:37:30 +0100
Message-ID: <878xtd35tx.fsf@meuh.mnc.lan> (raw)
In-Reply-To: <821c2ab80601180703h3f4b362cl@mail.gmail.com>
References: <821c2ab80601180703h3f4b362cl@mail.gmail.com>
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
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: gc@mnc.ch, wagner.and@gmail.com
Subject: Re: PROBLEM WITH DRIVER LOAD
In-Reply-To: <878xtd35tx.fsf@meuh.mnc.lan>
References: <821c2ab80601180703h3f4b362cl@mail.gmail.com> <878xtd35tx.fsf@meuh.mnc.lan>
* 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