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

Problem in PostgreSQL - jdbc

From: Seema Noor <seema_56(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Problem in PostgreSQL - jdbc
Date: 2001-03-25 18:12:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfacespgsql-jdbcpgsql-novice
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 
   How do I set the driver? I used the statements:

   Driver driver = (Driver)Class.forName  

   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 
export CLASSPATH    =

    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.


pgsql-novice by date

Next:From: Aaron BrashearsDate: 2001-03-25 22:06:22
Subject: Re: [JDBC] Problem in PostgreSQL - jdbc
Previous:From: Tom LaneDate: 2001-03-25 16:48:07
Subject: Re: On Postgres and permissions, cant read a file into a table

pgsql-interfaces by date

Next:From: Peter EisentrautDate: 2001-03-25 20:39:09
Subject: Re: pgmonitor on solaris
Previous:From: Paul MateosDate: 2001-03-25 04:50:38
Subject: ODBC Driver Needed

pgsql-jdbc by date

Next:From: Peter EisentrautDate: 2001-03-25 20:35:31
Subject: Re: Compiling
Previous:From: Peter MountDate: 2001-03-25 18:03:34
Subject: Re: Compiling

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