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]

qtjava and GCJ update


I have committed a fix for GCJ's java.util.IdentityHashMap that was 
causing JNI crashes with qtjava. The "ScribbleWindow" demo from 
kdebindings-2.2.2 should be running fine with GCJ 3.1 now. I have not 
been able to reproduce Richard Dale's problem which seems like a 
different issue.

Here's what I did to get it running:

1. Install qt-devel, kdelibs-devel, and kdelibs-sound-devel from Redhat 7.2.

2. Download kdebindings source from 
ftp://ftp.kde.org/pub/kde/stable/2.2.2/src/kdebindings-2.2.2.tar.bz2

3. unpack and ./configure --with-qt-dir=/usr/lib/qt-2.3.1

4. cd qtjava; make

5. cd javalib

6. Compile qtjava java source into a shared library:
gcj -classpath . org/kde/qt/*.java -shared --jni -o libqtgcj.so
(the --jni option tells gcj that "native" methods will be implemented 
using JNI, this is important. You can also add -O2 to get a smaller 
faster library, but it will take longer to build)

7. copy the qtjava JNI library into the current directory so it will be 
easier to get at
cp javalib/qtjava/.libs/*.so .

8. compile ScribbleWindow
gcj test/ScribbleWindow.java --main=ScribbleWindow -o scribble -L. -lqtgcj

9. set runtime library path
export LD_LIBRARY_PATH=.

10. run it
./scribble

11. scribble!!

regards

Bryce.



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