JDBC

From: Armin Preis <preisa(at)sbox(dot)tugraz(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: JDBC
Date: 2001-04-06 14:08:16
Message-ID: 3ACDCE48.D27B9823@sbox.tugraz.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to connect to a Postgresql Database(Ver. 6.5) on my localhost
with JDBC, but it doesnt work.

Is the following code ok?

//[...]

Class.forName("postgresql.Driver");
con = DriverManager.getConnection(jdbc:postgresql:databasename,
username, password); //where con is a Connection

//[...]

My JDK directory is:
/usr/java/jdk1.3/

My directory with my java-program is:
/home/me/database/

The Directory with de JDBC driver for Postgresql is:
/usr/lib/pgsql/jdbc6.5-1.2.jar

And how do i set the correct CLASSPATH in Linux so that my program
works?

Thanks in advance,
Armin

Responses

  • Re: JDBC at 2001-04-06 18:18:11 from Armin Preis
  • Re: JDBC at 2001-04-08 23:11:26 from Tim Freund

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-04-06 14:37:50 Re: Views and default values
Previous Message Tim Knowles 2001-04-06 13:49:34 Can't recreate view from backup