Errors Trying To Use JDBC

Поиск
Список
Период
Сортировка
Искать

Errors Trying To Use JDBC

От:
Corey Mosher <corey@pgsql.com>
Дата:
Hi,
  When I try to use the postgresql.jar I get the following error:

> java sample
Exception caught.
java.lang.ClassNotFoundException: org.postgresql.Driver
java.lang.ClassNotFoundException: org.postgresql.Driver
        at sample.(sample.java:10)
        at sample.main(sample.java:38)

Here is my classpath:

set CLASSPATH = ($CLASSPATH /usr/local/lib/postgresql.jar .)

Anyone have any ideas here?

Thanks

Corey Mosher

-----------------------------
Hub.Org Networking Services 
251 Main St. 
Wolfville, NS
Canada
B0P 1X0
Email: corey@hub.org
Phone: (902) 542-3657
-----------------------------
PostgreSQL, Inc.
251 Main St.
Wolfville, NS
Canada
B0P 1X0
Email: corey@pgsql.com
Phone: (902) 542-0713
-----------------------------
Fax:   (902) 542-5386

Re: Errors Trying To Use JDBC

От:
Corey Mosher <corey@pgsql.com>
Дата:
I'm using tcsh, so I think it is done the way I did it below.
Maybe I'm wrong though, anyone have any ideas?

Corey

On Mon, 16 Apr 2001, toby cabot wrote:

> > 
> >set CLASSPATH = ($CLASSPATH /usr/local/lib/postgresql.jar .)
> > 
> 
> CLASSPATH is colon-delimited so try:
> 
> set CLASSPATH = ($CLASSPATH:/usr/local/lib/postgresql.jar:.)
> 
> 

Corey Mosher

-----------------------------
Hub.Org Networking Services 
251 Main St. 
Wolfville, NS
Canada
B0P 1X0
Email: corey@hub.org
Phone: (902) 542-3657
-----------------------------
PostgreSQL, Inc.
251 Main St.
Wolfville, NS
Canada
B0P 1X0
Email: corey@pgsql.com
Phone: (902) 542-0713
-----------------------------
Fax:   (902) 542-5386

Re: Errors Trying To Use JDBC

От:
"Peter B. West" <pbwest@powerup.com.au>
Дата:
Corey

I don't use tcsh (thank Heaven), but I think that `path' is a special
variable in tcsh, which also maintains the `PATH' variable.  `path' is a
space-separated list, whereas `PATH' is the normal colon-separated
list.  tcsh maintains the synchronisation between the two.  None of this
magic contaminates CLASSPATH, which is expected to look like PATH.

It's all a good reason for sticking with (k|z|ba)sh.

Peter

Corey Mosher wrote:
> 
> I'm using tcsh, so I think it is done the way I did it below.
> Maybe I'm wrong though, anyone have any ideas?
> 
> Corey
> 
> On Mon, 16 Apr 2001, toby cabot wrote:
> 
> > >
> > >set CLASSPATH = ($CLASSPATH /usr/local/lib/postgresql.jar .)
> > >
> >
> > CLASSPATH is colon-delimited so try:
> >
> > set CLASSPATH = ($CLASSPATH:/usr/local/lib/postgresql.jar:.)

-- 
Peter B. West  pbwest@powerup.com.au  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"
FAQ