I am totally lost

Поиск
Список
Период
Сортировка
От Julian Brown
Тема I am totally lost
Дата
Msg-id 011f01c26f20$c2235fd0$1701a8c0@DADDYS
обсуждение исходный текст
Список pgsql-jdbc
JDBC users
 
I want to use jdbc on a Windows/Cygwin machine, and my Postgress is sitting on a different Linux box setup from the RH7.3 install.
 
I go to the PostgresSQL JDBC Drivers, and download the latest stable release which is pgjdbc2.jar.  No where on the website is the term pgjdbc2.jar mentioned, all the documentation refers to postgresql.jar.  Regardless, I set up the class path to include pgjdbc2.jar.
 
And I write the following code:
 
//  PostgressTest.java
 
import java.sql.*;
 
public class PostgressTest
{
    public static void main (String [] args)
    {
        System.out.println ("PostgressTest");
        System.out.println ("before loading drivers");
        try
        {
            Class.forName ("org.postgresql.Driver");
        }
        catch (Exception x)
        {
            System.err.println (x.toString ());
        }
        System.out.println ("after loading drivers");
    }
}
It fails at run time like so ...
 
PostgressTest
before loading drivers
java.lang.ClassNotFoundException: org.postgresql.Driver
after loading drivers
 
What is postgresql.jar, and what have I done wrong in this installation.  I am so confused.
 
Julian Brown
 

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: rfr
Дата:
Сообщение: Re: ERROR compiling JDBC 7.3 b2 with JDK1.4.1
Следующее
От: "Julian Brown"
Дата:
Сообщение: Re: I am totally lost