String url = "jdbc:postgresql://localhost/test";
Properties props = new Properties();
props.setProperty("user","fred");
props.setProperty("password","secret");
props.setProperty("ssl","true");
Connection conn = DriverManager.getConnection(url, props);
although there are different forms for the url connection string.
Do no forget to have the *.jar in your classpath.
You'd even like to look at this, http://pugs.postgresql.org/uae/
As rightly pointed out by Tom, please choose appropriate mailing list for
the respective problem,
cool.
Luckys.