This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Newbie question


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]