Hello v,
Thursday, February 01, 2001, 2:16:10 PM, you wrote:
vj> public void start() {
vj> try{ conn =
vj> DriverManager.getConnection("jdbc:postgresql://fmlhost.fml.t.u-tokyo.ac.jp/test","postgres","");
vj> stmt = conn.createStatement();
vj> }
Maybe you forgot to load the driver?
Excerpt from the SUN docs:
------------------------
Loading Drivers
Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you
wantto use the JDBC-ODBC Bridge driver, the following code will load it:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Your driver documentation will give you the class name to use. For instance, if the class name is jdbc.DriverXYZ , you
wouldload the driver with the following line of code:
Class.forName("jdbc.DriverXYZ");
You do not need to create an instance of a driver and register it with the DriverManager because calling Class.forName
willdo that for you automatically. If you were to create your own instance, you would be creating an unnecessary
duplicate,but it would do no harm.
When you have loaded a driver, it is available for making a connection with a DBMS.
-------------
--
Best regards,Bruno mailto:bruno@dickhoff.de