Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What do I need to do to make JDBC work

0 views
Skip to first unread message

Eamon Reyn

unread,
Nov 16, 2003, 7:50:01 PM11/16/03
to
Hi Guys,

I have managed to get postgresql to work under cygwin under windows but now
I am trying to connect to a db using Java.

However I can not make my java app connect to the database I have created,
In fact I cannot even get past this point in code without creating an
exception.

try{
Class.forName("org.postgresql.Driver");
}
catch(ClassNotFoundException e){
java.awt.Dialog dlg = new java.awt.Dialog(this, "Database error",
true);
dlg.show();
}

from reading newsgroup posts It seems my PATH and CLASSPATH may be wrong but
I have double and triple checked them and can't see an obvious problem.

There are several pages I have looked at and one talks about needing Apache
ANT to be able to do JDBC
Is this true if so where can I go to get instructions for installing Ant in
Cygwin.

These instructions are off the web page jdbc.postgresql.org
To compile the JDBC driver, you need to have ANT installed. ANT is part
of the Apache Jakarta project.Once you have ant installed, change to the
root of the PostgreSQL source tree and run configure.

e.g.: $> ./configure --with-java

when I do this I get the following error >> ./configure: No such file or
directory

I have also tried using the Cygwin docs to little avail

Help.

Here are some specs so you know what versions of things I am on

Windows 2000
Cygwin 2.416 (i think but am not sure how to get version info)
Postgresql 7.3.4
IPC-Daemon2
Java 1.4.1

Eamon Reyn.


Eamon Reyn

unread,
Nov 16, 2003, 10:30:19 PM11/16/03
to
I missed out an important piece of information.

I am an idiot.

I fixed the problem my thanks to

Amy, Owen and Nick of Amy, Owen and Nicks Website and their useful faq.
http://www.fankhausers.com/postgresql/jdbc/welcome.html

Eamon


0 new messages