Got database working from java (via postgresql JDBC driver).