This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Newbie question
- From: Anthony Green <green at redhat dot com>
- To: Jürgen Hoffmann <jh at byteaction dot de>
- Cc: java at gcc dot gnu dot org
- Date: 18 Nov 2002 09:21:01 -0800
- Subject: Re: Newbie question
- References: <005001c28f11$890afd50$8300a8c0@buddyxp>
On Mon, 2002-11-18 at 06:48, Jürgen Hoffmann wrote:
> I call it using: gcj -o mysql-jdbc.so mm.mysql-2.0.14-bin.jar
You're almost there...
$ gcj -shared -o mysql-jdbc.so mm.mysql-2.0.14-bin.jar
However, you should really call your shared library something else.
JDBC drivers are often loaded by name, and the gcj's Class.forName()
uses a special search algorithm to find natively compiled classes at
runtime. If the jdbc driver code is all in org.gjt.mm.mysql, then
you'll want to call your library (in decreasing order of preference)...
lib-org-gjt-mm-mysql.so, or
lib-org-gjt-mm.so, or
lib-org-gjt.so, etc..
AG