Java Postgres drivers.

From: Dave Coventry <dgcoventry(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Java Postgres drivers.
Date: 2009-12-28 08:28:47
Message-ID: 4cba5adc0912280028y1a91d458p9e6cbe217b723c2f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm not sure this is the right place to enquire...

I'm trying to connect to a postgres datanbase with Java.

import java.sql.*;

public static void main(String[] args) {
// TODO code application logic here
try{
System.out.println("Starting...");
Class.forName("org.postgresql.Driver");
String url="jdbc:postgresql:inenergy";
System.out.println("Got here...");

catch(Exception e){
System.out.println("Error..."+e.getMessage());

}
}

Just don't get to the 'Got here...' statement.

Can anyone see what I'm doing wrong?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-12-28 08:37:05 Re: Java Postgres drivers.
Previous Message donniehan 2009-12-28 06:30:25 Re: Why grantor is owner in this case?