[Java-gnome-developer] Re: java-gtk 2 error on tests
Brought to you by:
afcowie
From: cedric <ced...@fr...> - 2002-06-03 19:54:03
|
Hi, I just resolved my problem. The error was in my libGTKJava.so.0.8.0 binary, which lacks of all the symbols from the libglade-2.0. I didn't know if the problem come from my system or the java-gnome configure.in but the solution permits to have a working java-gtk system....GREAT! => I am able to run all "java TestGTK" tests (run as good as Swing...speed is very good) without any problems (with sun jdk1.4, GTK2 version 2.0.1, libglade and libxml from Gnome2 pre1) THANKS A LOT TO ALL THE WORKER. I expect to give apps for the examples directory, as soon as I have time to do one, of course :-) For Clemens Eisserer: your classpath problem isn't. Even with only CLASSPATH=/usr/gnome/share/java-gnome/gtk.jar:. set on my linux box, I have no errors like "java.lang not found". Maybe try to set "export JAVA_HOME=/opt/java1.4" or even "export PATH=/opt/java1.4/bin:$PATH". Good luck. May be I will have some time to try to compile and run the TestGTK using gcj...not sure. Cedric ---------------------------------------------------------------------------- ---------- SOLUTION (edit the paths to reflect your gnome2 installation path!!): 1. edit the makefile in src directory to complete this lines (which were empty for me) (else all must work well): LIBGLADE_CFLAGS= -I/usr/gnome2/include/libglade-2.0 -I/usr/gnome2/include/li bxml2/libxml LIBGLADE_LIBS= -lglade-2.0 2. type make all (or "make gtk_nativelib" to build only the libGTKJava.so.0.8.0) ---------------------------------------------------------------------------- ---------- PROBLEMS WAS: Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/gnome2/lib/libGTKJava.so.0.8.0: /usr/gnome2/lib/libGTKJava.so.0.8.0: undefined symbol: glade_xml_get_widget at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1480) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1404) at java.lang.Runtime.loadLibrary0(Runtime.java:772) at java.lang.System.loadLibrary(System.java:832) at gnu.glib.GObject.<clinit>(GObject.java:141) at gnu.gtk.Gtk.init(Gtk.java:35) at TestGTK.main(TestGTK.java:1330) with following CLASSPATH=/usr/gnome2/share/java-gtk/gtk-0.8.0.jar:/usr/gnome2/share/java-gt k/gtk.jar:.: and following LD_LIBRARY_PATH=/usr/gnome2/lib |