Skip site navigation (1) Skip section navigation (2)

Re: PROBLEM WITH DRIVER LOAD

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: Wagner <wagner(dot)and(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PROBLEM WITH DRIVER LOAD
Date: 2006-01-18 15:37:30
Message-ID: 878xtd35tx.fsf@meuh.mnc.lan (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-jdbc by date

Next:From: Tom LaneDate: 2006-01-18 15:57:29
Subject: Re: [PPOSTGRES][PSQL] Segmentation fault
Previous:From: WagnerDate: 2006-01-18 15:03:53
Subject: PROBLEM WITH DRIVER LOAD

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group