Laszlo Hornyak wrote:
>
> Simply java doesn`t find the driver classes.
> What does the following say?
Oops ... I posted the wrong ouput ... the driver class is being found (I
think, since it is being registered). Maye I need InstanceOf()? Here is
the error message I get:
D:\java>java -cp .;pgjdbc2.jar Example1
Checking if Driver is registered with DriverManager.
Registered the driver ok, so let's make a connection.
Couldn't connect: print out a stack trace and exit.
Connection refused. Check that the hostname and port is correct, and
that the postmaster is running with the -i flag, which enables TCP/IP
networking.
at org.postgresql.Connection.openConnection(Connection.java:141)
at org.postgresql.Driver.connect(Driver.java:149)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Example1.main(Example1.java:26)
> set %CLASSPATH
CLASSPATH=.;d\j2sdk1.4.1
Jc