From: | "Jayesh K(dot) Parayali" <jparayali(at)TOTALFLOOD(dot)com> |
---|---|
To: | "Craig Lawton" <craiglawton(at)qwest(dot)net>, <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Error: ClassNotFoundException |
Date: | 2001-10-29 17:24:55 |
Message-ID: | 8ACB76BF6B98C94FB6959B660C051BA507D5B5@PACIFIC.TOTALFLOOD.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
export
CLASSPATH=$CLASSPATH:/usr/local/pgsql/share/java/jdbc7.1-1.1.jar:.
You can keep ur driver anywhere but should be included in your CLASSPATH
environment variable.
Then execute ur program
Jayesh
> -----Original Message-----
> From: Craig Lawton [SMTP:craiglawton(at)qwest(dot)net]
> Sent: Friday, October 26, 2001 8:35 PM
> To: pgsql-jdbc(at)postgresql(dot)org
> Subject: [JDBC] Error: ClassNotFoundException
>
> Hello All,
>
> I'm a fairly experienced developer, however, a complete newbie when it
>
> comes to using PostgreSQL and JDBC. I have successfully installed
> PostgreSQL on my Mac G4 running Mac OS X 10.1. I'm able to start the
> DB
> daemon (with -i extension), I've created and populated a database (can
>
> query the database, etc.). When I installed PostgreSQL, I created a
> user account named "postgres" on my computer, and start the DB daemon
> while logged onto that account (in a console window after logging into
>
> the postgres account using 'su - postgres'). I've downloaded the
> pre-compliled jdbc7.1-1.1.jar JDBC driver. I put the JDBC driver file
>
> in /usr/local/pgsql/share/java. I've been trying to use JDBC to
> connect
> to a database and started with Marc Liyanage's example source file.
> When I try and run the executable after compilation I get an error.
> Specifically, the line of code in
> "Class.forName("org.postgresql.Driver");" returns the error
> "java.lang.ClassNotFoundException: org.postgresql.Driver". I'm at a
> bit
> of a loss. Do I have to register the JDBC driver? If I do, how do I
> do
> that? Could this be because the PostgreSQL daemon is running from a
> different account than I am running the JDBC test application from?
> Did
> I put the JDBC driver in the wrong directory?
>
> Would really appreciate the help.
>
> Thanks,
>
> Craig Lawton
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Gunnar Rønning | 2001-10-29 17:41:37 | Re: j2ee compatiable jdbc driver on jdbc.postgresql.org? |
Previous Message | Erwin Ambrosch | 2001-10-29 16:52:26 | SQL-Statement is too long |