JDBC - Mailing list pgsql-general

From Armin Preis
Subject JDBC
Date
Msg-id 3ACDCE48.D27B9823@sbox.tugraz.at
Whole thread Raw
Responses Re: JDBC
List 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

pgsql-general by date:

Previous
From:
Date:
Subject: ERROR: cannot read block 1452 from data (HELP!!!! I'M DESPERATE!)
Next
From: "Oliver Elphick"
Date:
Subject: Re: Debian packages of 7.1RC3