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: linking a java class and a .so library with GCJ


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/


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