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