Re: Loading jdbc6.5-1.2.jar via forName()

From: Steve Waldman <swaldman(at)mchange(dot)com>
To: Wayne Johnson <wdtj(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Loading jdbc6.5-1.2.jar via forName()
Date: 2000-12-09 23:10:01
Message-ID: 20001209181001.B13552@peanut-butter.mchange.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi.

If you are writing an application, you need to make
sure that the jar file is in your application's
CLASSPATH. Append the full path to the jar file,
including the jar file name itself to
your CLASSPATH environment variable. (The CLASSPATH
is a list of directories and jar files under which
a JVM will by default search for classes. Like the
PATH variable, entries are separated from one another
with a ':'" on UNIX platforms, ';' on Windows.)

If you are writing an Applet, you need to add an
archive attribute to the applet tag in your html,
whose value is a path from your html file to the
jar file. e.g.

<APPLET
code="mypkg.MyApplet"
codebase="classes"
archive="jars/jdbc6.5-1.2.jar"
width="150"
height="150"
>
</APPLET>

good luck,
Steve

On Sat, Dec 09, 2000 at 04:51:45PM -0600, Wayne Johnson wrote:
>
> I've installed postgresql-6.5 (client, server & jdbc) on my Linux
> system. I've copied the jdbc6.5-1.2.jar file to the directory where my
> html and application class file is located. When the java code calls
> forName("postgresql.Driver"), it just stalls. I even tried renaming
> jdbc6.5-1.2.jar to postgresql.jar, but that didn't seem to help either.
>
> If I extract the jar file into a postgresql directory, it seems to work.
>
> How do I get forName to load from the jar file?
>
> Thanks.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Nabil Sayegh 2000-12-10 02:04:30 Re: [BUGS] 7.1beta1 JDBC Nested cursor problem
Previous Message Stu Coates 2000-12-09 22:57:58 7.1beta1 JDBC Nested cursor problem