linking a java class and a .so library with GCJ
Ranjit Mathew
rmathew@gmail.com
Fri Mar 11 07:11:00 GMT 2005
Alban Taraire wrote:
>
> I base the project on the jdic tray api, that is basically a tray.jar file
> and a libtray.so or libtray.dll according to if you want to use this on
libtray.so is the JNI native library for tray.jar, right?
> gcj --main=IconDemo -o icondemo IconDemo.java --classpath=:.:tray.jar
You need to link in tray.jar too, since you're creating
a fully native executable. Try:
gcj --main=IconDemo -fjni -o icondemo IconDemo.java tray.jar
(The -fjni is important if tray.jar uses JNI to talk to libtray.so.)
HTH,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
More information about the Java
mailing list