我今天建了一个java程序,出现以下问题:
Exception caught .
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:161)
at org.postgresql.Driver.connect(Driver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at sample.<init>(sample.java:11)
at sample.main(sample.java:33)
我不知道怎么修正目前的错误,因为是初学,请各位帮忙,谢谢