[Kde-java] Using GCJ with KDE Java
Daniel Hanlon
daniel.hanlon at man.ac.uk
Tue Mar 2 12:47:19 CET 2004
On Monday 01 March 2004 21:59, George Russell wrote:
> I've tried using GCJ to compile a KDEJava application, but I get link
> time errors.
>
> First, I'd like to know if anyone has successfully compiled a KDE Java
> application using GCJ?
>
> Secondly, is there a magic incantation to get the two to work togther?
I've managed to get a few apps working with the kdejava bindings and gcj. I
dowloaded the kdejava and qtjava modules seperately and built them to create
qtjava.jar and koala.jar.
I then compiled the two jars with: (kde installed in /usr/kde/cvs)
gcj -L/usr/kde/cvs/lib -lqtjava qtjava.jar -fjni -shared -o libqtjavabind.so
gcj -I<path to qtjava>/javalib -L/usr/kde/cvs/lib -lqtjavabind -lkdejava
koala.jar -fjni -shared -o libkoalabind.so
You can check with ldd that the produced shared objects are linking correctly.
Then, for example, the KProgressTest.java example compiles with:
gcj KProgressTest.java --main=KProgressTest -o kprogresstest -lkoalabind
-I<path>/qtjava/javalib -I <path>/kdejava/koala
Whilst the resulting executable worked fine, there was clearly a problem
somewhere (probably in libgcj?) as when I left it running for a day or so, it
ended up using 300 odd MB of RAM....
Hope this helps,
Daniel.
--
----------------
Daniel Hanlon
e-Science, Manchester Computing,
Manchester University, UK.
More information about the Kde-java
mailing list