Re: Postgres-jdbc example!

Поиск
Список
Период
Сортировка
От pocm@rnl.ist.utl.pt (Paulo J. Matos)
Тема Re: Postgres-jdbc example!
Дата
Msg-id 87ofjszbqe.fsf@localhost.localdomain
обсуждение исходный текст
Ответ на Postgres-jdbc example!  (pocm@rnl.ist.utl.pt (Paulo J. Matos))
Ответы Re: Postgres-jdbc example!  ("Dave Cramer" <Dave@micro-automation.net>)
Re: Postgres-jdbc example!  ("Thomas O'Dowd" <tom@nooper.com>)
Список pgsql-jdbc
Just for the record, here's my failed try to load the driver:
(oh, and I already started postmaster with -i option)

import java.sql.*;

public class init {

    public static void main (String args[]) {
    Class.forName("org.postgresql.Driver");
    }
}

I get:
pdestroy@localhost:~/ist/bd/proj$ javac init.java
init.java:6: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown
        Class.forName("org.postgresql.Driver");
             ^
1 error


Best regards,

Paulo


pocm@rnl.ist.utl.pt (Paulo J. Matos) writes:

> Hi all,
>
> I've installed postgres with jdbc driver and added the
> postgresql.jar to the classpath (it's the only path in classpath)
> environment variable.
>
> I also have installed JDK from sun... I'm trying to do a database
> connection but I'm failing to do anything that works.
> Can you please give me a extremely simple example of how this
> stuff works or references to an example?
> I've tried to read tutorials and some other stuff but I failed to
> understand... I'm a Java and jdbc beginner so it's really not
> easy for me but I hope that with a simple example I can
> understand it.
> I'm not even sure that my jdbc driver is installed correctly and
> working so if you send me any kind of code to test it, I'd be
> glad!
>
> TIA,
> My best regards,
>
> --
> Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
> Instituto Superior Tecnico - Lisbon
> Software & Computer Engineering - A.I.
>  - > http://www.rnl.ist.utl.pt/~pocm
>  ---
>     Yes, God had a deadline...
>         So, He wrote it all in Lisp!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Paulo J. Matos : pocm(_at_)rnl.ist.utl.pt
Instituto Superior Tecnico - Lisbon
Software & Computer Engineering - A.I.
 - > http://www.rnl.ist.utl.pt/~pocm
 ---
    Yes, God had a deadline...
        So, He wrote it all in Lisp!

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

Предыдущее
От: pocm@rnl.ist.utl.pt (Paulo J. Matos)
Дата:
Сообщение: Postgres-jdbc example!
Следующее
От: "Dave Cramer"
Дата:
Сообщение: Re: Postgres-jdbc example!