Getting started with jdbc3 and eclipse - Mailing list pgsql-jdbc

From Dominik Heller
Subject Getting started with jdbc3 and eclipse
Date
Msg-id 20071017135658.306680@gmx.net
Whole thread Raw
Responses Re: Getting started with jdbc3 and eclipse
Re: Getting started with jdbc3 and eclipse
Re: Getting started with jdbc3 and eclipse
List pgsql-jdbc
Hi All,
I am about to get started with postgresql 8.2 and eclipse. the installation of the postgres DB was successful and now
myproblem is how to find the driver in eclipse. I have set the classpath correctly and I also added the library to the
eclipseproject (although I know the is not even neccessary). 

So now by trying to establish a connection with the following code:

Class.forName("org.postgresql.Driver");
            db = DriverManager.getConnection("localhost:5432", "postgres", "*****");

I get this exception:

java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at com.seitenbau.test.testDB.<init>(testDB.java:12)
    at com.seitenbau.test.App.main(App.java:14)


So I am using jdk 1.5_12 and the postgresql-8.2-506.jdbc3.jar

Does someone has any idea? THX in advance

-Dominik
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

pgsql-jdbc by date:

Previous
From: Michael Paesold
Date:
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Next
From: Guillaume Cottenceau
Date:
Subject: Re: Getting started with jdbc3 and eclipse