Re: Newbie: connecting from windows to Linux: how-to?

From: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
To: Laszlo Hornyak <hornyakl(at)rootshell(dot)be>, pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Newbie: connecting from windows to Linux: how-to?
Date: 2002-10-09 10:11:17
Message-ID: 3DA400C5.3020505@mega-bucks.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Laszlo Hornyak wrote:
> As much as I know Pg doesn`t build on windows. Maybe try it on linux.
>
> to check a jar file:
> jar tf jarfile.jar
> if you see the class file, it is ok.

I'm using Pg on Linux but Java on Windows. The jar file seems fine using
the command you gave.

I did check that Pg is running with IP on ...

$ netstat -an | grep 5432 | grep LISTEN
unix 2 [ ACC ] STREAM LISTENING 1347 /tmp/.s.PGSQL.5432

I tried the test program suggested in the link given by Joe Shevland and
everything seems to be fine except for my connection string.

I have tried these various connection strings:

Connection c = null;

c1 =
DriverManager.getConnection("jdbc:postgresql://192.168.254.14/JC","postgres","");
c2 =
DriverManager.getConnection("jdbc:postgresql://192.168.254.14:5432/JC","postgres","");

And get this error for both strings:

Checking if Driver is registered with DriverManager.
Couldn't find the driver!
Let's print a stack trace, and exit.
java.lang.ClassNotFoundException: org.postgresql.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at Example1.main(Example1.java:10)
Jc

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jean-Christian Imbeault 2002-10-09 10:46:23 Re: Newbie: connecting from windows to Linux: how-to?
Previous Message Jean-Christian Imbeault 2002-10-09 09:46:56 Re: Newbie: connecting from windows to Linux: how-to?