This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: shared library
- To: "Anthony Green" <green at redhat dot com>,<tromey at redhat dot com>
- Subject: RE: shared library
- From: "Jayesh K. Parayali" <jparayali at TOTALFLOOD dot com>
- Date: Wed, 24 Oct 2001 11:55:00 -0700
- Cc: <java at gcc dot gnu dot org>
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
>
>
>
>