dbTalk Databases Forums  

What do I need to do to make JDBC work

comp.databases.postgresql.interfaces comp.databases.postgresql.interfaces


Discuss What do I need to do to make JDBC work in the comp.databases.postgresql.interfaces forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eamon Reyn
 
Posts: n/a

Default What do I need to do to make JDBC work - 11-16-2003 , 06:50 PM






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.



Reply With Quote
  #2  
Old   
Eamon Reyn
 
Posts: n/a

Default Re: What do I need to do to make JDBC work - 11-16-2003 , 09:30 PM






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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.