Re: Problem in PostgreSQL - jdbc

From: PostgreSQL Server <postgres(at)gonzo(dot)lnxsoftware(dot)com(dot)mx>
To: Seema Noor <seema_56(at)yahoo(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>, <pgsql-jdbc(at)postgresql(dot)org>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Problem in PostgreSQL - jdbc
Date: 2001-03-25 22:07:18
Message-ID: Pine.LNX.4.30.0103251506400.19722-100000@gonzo.lnxsoftware.com.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-jdbc pgsql-novice

On Sun, 25 Mar 2001, Seema Noor wrote:

> I want to know how to use jdbc for postgresql in red
> hat linux 7.0. I have installed red hat linux 7.0
> completely and there are four jdbc.jar files of
> different version.There are no postgresql.jar and
> finder.jar files. I found two different methods for
> jdbc interface:
>
> 1) Just set the path
> CLASSPATH=$CLASSPAH /usr/lib/pgsql/jdbc6.5.1.2.jar
> and compile the program.
>
> But when I compiled the program using jdk1.1.2
> there was an exception CLASSNOTFOUND. When this
> exception was caught it gave the error message
> "postgresql/driver"
> How do I set the driver? I used the statements:
>
> Driver driver = (Driver)Class.forName
> ("postgresql.Driver").newInstance();
>
> DriverManager.registerDriver(driver);
>
> String url = "jdbc:postgresql:jtest";
>
> Connection con = DriverManager.getConnection
> (url, "postgres", "postgres");
>
> Statement stm = con.createStatement();
>
> Do I have to use "org.postgresql.Driver" instead
> of "postgresql.Driver"?
>
>
> 2) Change to directory src/interface/jdbc and type:
> % make
> to get postgresql.jar and then set the class path
> to:
>
> export CLASSPATH =
> /usr/local/lib/finder.jar:/usr/local/lib/
> postgresql.jar:.java uk.org.retep.finder.Main
>
> This src/interface/jdbc is not in any of the
> postgresql directories (installed from red hat
> linux 7.0)I therefore downloaded
> postgresql-7.0.2.tar but some classes were missing
>
> in it.
> If I'll succeed in getting postgresql.jar from
> this method then how will I get finder.jar?
>
> I found in the same mailing list to rename jdbc6.5.1.2
> .jar to postgresql.jar and then set the CLASSPATH. But
> it also didn't work out.
>
> Can someone please help me?
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

try

org.postgresql.Driver

leonel

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Hiroshi Inoue 2001-03-26 04:22:05 Re: ODBC Driver Needed
Previous Message Aaron Brashears 2001-03-25 22:06:22 Re: [JDBC] Problem in PostgreSQL - jdbc

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mike Cannon-Brookes 2001-03-26 00:47:16 RE: Compiling
Previous Message Aaron Brashears 2001-03-25 22:06:22 Re: [JDBC] Problem in PostgreSQL - jdbc

Browse pgsql-novice by date

  From Date Subject
Next Message Mo Holkar 2001-03-26 08:47:36 Re: Error creating user
Previous Message Aaron Brashears 2001-03-25 22:06:22 Re: [JDBC] Problem in PostgreSQL - jdbc