Newbie question
Anthony Green
green@redhat.com
Mon Nov 18 09:35:00 GMT 2002
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
More information about the Java
mailing list