-1
我有一個連接到我的本地系統postgresql數據庫的JDBC程序。如何使用jdbc類型4驅動程序連接到其他系統數據庫
Class.forName("org.postgresql.Driver");
Connection con=DriverManager.getConnection("jdbc:postgresql://localhost:5432/LOCATIONS_INFO","postgres","password");
System.out.println("Connection Created");
這成功執行。我也想連接到同一局域網中另一個系統上的postgresql數據庫。當我用另一個想連接的系統的IP替換本地主機時,我得到一個異常。
請幫助我如何實現連接。
至少發佈異常+堆棧跟蹤 – 2013-04-26 07:24:13