Thread: Re: [Java-gnome-developer] java-gtk 2 error on tests
Brought to you by:
afcowie
From: Clemens E. <Lin...@we...> - 2002-05-28 13:28:05
|
"cedric" <ced...@fr...> schrieb am 28.05.02: > Hello, > First thanks to all the guys which have given time to this project.....i= t's > splendid ! I also think its very nice stuff! The GCJ-native compilation-feature i lik= e best. But my makfile doesnt compile that gcj-stuff well, so... > library loading error): > 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=5Fxml=5Fget=5Fwidget > 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) >=20 In the source-directory there is an /lib -dir. Inthis directory there are = some files. Copy the file libGTK.so to /usr/lib and run ldconfig as su, or= set the LD=5FLIBRARY=5FPATH with "export LD=5FLIBRARY=5FPATH=3D/../.." to the driec= tory which contains such a file. > I have a few questions: > - Is libglade (and thus libxml2) necessary in order to use java-gtk with= > GTK2 (not java-gnome)=3F Dankt thinnk so. But its needed if you want to load xml-file made with gla= de. > (Note that current CVS source do not compile without changes with these > libraries missing) > If not, I suppose I must change the Makefile....isn't it=3F I=B4m soory, I dont know it exaclty. I=B4m also very new here... > Thank you to any one which can help me to at least run GTK test and get = my > hands on java with GTK. Yeas this is a little bit tricky for not java-jni experts. I have also ver= y much problems... Currently I can only use Kaffe to run my java-gtk examples, because i dont= know the standard-classpath of the jdk1.4 (intalled in /opt/java1.4/). So= f I set CLASSPATH=3D/usr/lib/gtk.jar it doesnt find the java.lang and other= packages... Maybe you can help me=3F Much luck and fun with java-gtk! cu Linuxhippy =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!=20 Beim WEB.DE Lottoservice: http://tippen2.web.de/=3Fx=3D13 |
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 |
From: Clemens E. <Lin...@we...> - 2002-06-04 16:35:46
|
Hi! >I am able to run all "java TestGTK" tests (run as good as Swing...speed >is very good) > Oh come on, better than swing ;-) >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 :-) > I also can also only say thanks for this great stuff. It comines two very nice things: The Java-programming language, which is very intuitive and clean, and the fast and nice gtk native widget support. > >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. > Thanks for your tipps! That doesnt really matter. I can now compile my code with gcj - I found a mistake in the build-scripts so i built it my own.... Great! > >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 > > > >_______________________________________________________________ > >Don't miss the 2002 Sprint PCS Application Developer's Conference >August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > >_______________________________________________ >java-gnome-developer mailing list >jav...@li... >https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > > > |