JDBC in Red hat 9 - Mailing list pgsql-jdbc

From Joseph Thomas
Subject JDBC in Red hat 9
Date
Msg-id Sea2-F50NjVuMhvqgSt0000e3d3@hotmail.com
Whole thread Raw
Responses Re: JDBC in Red hat 9
List pgsql-jdbc
<div style="background-color:"><div>Ok I am new to Linux, so please bear with me. I am running Red Hat 9 that comes
withPostgreSQL7.3.2-3. </div><div> </div><div>I have created a "test" database and am trying to access it using a java
programthrough jdbc. </div><div>I am recieving and error: "Exception! java.lang.ClassNotFoundException:
postgresql.Driver"</div><div> </div><div>Ihave my CLASSPATH set to point to pg73b1jdbc1.jar, pg73b1jdbc2.jar and
pg73b1jdbc3.jar.</div><div> </div><div>Iam reading a HOW TO for jdbc and PostgreSQL From <a
href="http://tldp.org/HOWTO/Enterprise-Java-for-Linux-HOWTO-6.html">http://tldp.org/HOWTO/Enterprise-Java-for-Linux-HOWTO-6.html</a>
butthis is for version 6.5, do I need to do anything else?</div><div> </div><div>here is my java code:</div><div>import
java.sql.*;<br/><br />class PostgreSQLTest {<br />  public static void main (String[] args) {<br />    try {<br />     
Driverdriver = (Driver)<br />        Class.forName("postgresql.Driver").newInstance();<br />     
DriverManager.registerDriver(driver);<br/><br />      String     url = "jdbc:postgresql:javatest"; <br />     
Connectioncon = DriverManager.getConnection(url, "postgres", ""); <br />      Statement  stm = con.createStatement();
<br/><br />      stm.setQueryTimeout(10); <br />      ResultSet  rs  = stm.executeQuery("select col1 from test"); <br
/><br/>      rs.next(); <br /><br />      System.out.println(rs.getString(1)); <br /><br />    } catch (SQLExcept ion
e){ <br /><br />      System.out.println("Exception!"); <br />      System.out.println(e.toString()); <br />  } <br />}
<br/></div></div><br clear="all" /><hr />Tired of spam? Get <a href="http://g.msn.com/8HMLENUS/2734??PS=">advanced junk
mailprotection</a> with MSN 8. 

pgsql-jdbc by date:

Previous
From: Fernando Nasser
Date:
Subject: JDBC: LONGVARBINARY upload patch
Next
From: Barry Lind
Date:
Subject: Re: JDBC: Better initial capacity for StringBuffers reduces