shared library
Jayesh K. Parayali
jparayali@TOTALFLOOD.com
Wed Oct 24 11:57:00 GMT 2001
Tom/Anthony,
I renamed the file to lib-org-postgresql.so and it worked. Thanks for
your help.
Jayesh
> -----Original Message-----
> From: Anthony Green [SMTP:green@redhat.com]
> Sent: Tuesday, October 23, 2001 5:52 PM
> To: tromey@redhat.com; Jayesh K. Parayali
> Cc: java@gcc.gnu.org
> Subject: Re: shared library
>> Tom wrote:
> > For #2 do you mean you have to link using `-ljdbc'?
> > If so then that is normal. Right now using gcj isn't much different
> > from using gcc or g++. You have to link against the libraries you
> > use. I'm surprised that your application could link without this.
>> That's how jdbc works - you load the driver by name. The jdbc stuff
> in libgcj
> takes care of everything else...
>> java.sql.DriverManager.registerDriver (Class.forName
> ("org.postgresql.Driver").newInstance());
>> I think the problem here is that you've chosen a poor name for the
> driver
> library. Try calling it `lib-org-postgresql.so' instead of
> `libjdbc.so'.
> That's the name libgcj needs in order to find the driver class.
> strace your
> application to see the various combinations of names libgcj is
> attempting.
>> Better yet - simply download and build the postgresql jdbc driver from
> rhug...
> http://sources.redhat.com/rhug .
>> AG
>>>>
More information about the Java
mailing list