Re: [Java-gnome-developer] Problem running glade program
Brought to you by:
afcowie
From: Benjamin P. J. <bp...@te...> - 2004-12-18 16:19:17
|
David, I was the one who put up the little Glade example. I know that it is far from finished but I realized that there were no other useful examples anywhere.... well: that's why I thought: better my more or less useless stuff than nothing.... :-) There are some good tutorials on how to actually RUN java-gnome programs. For the simple example I've put online you need the gnome libraries! You can start the example like this: JNI=3D/usr/lib/jni CP=3D/usr/share/java CLASSPATH=3D$CLASSPATH:$CP/gnome2.8.jar:$CP/gtk2.4.jar:$CP/glade2.4.jar LD_LIBRARY_PATH=3D$JNI CLASSPATH=3D$CLASSPATH java SimpleGladeExample My $JNI (/usr/lib/jni) contains the files: libgnomejava2.8.so libgtkjava2.4.so libgladejava2.4.so My $CP (/usr/share/java) contains: gnome2.8.jar gtk2.4.jar glade2.8.jar If you're missing any of the files (or you're using much older versions) the program will likely be failing. If I find the time I'll put up an example that's a bit simpler and won't utilize the gnome libraries.... Oh... and by the way. Mark was right: I had so much trouble converting "<" and ">" that I accidentaly left some bugs in the example... dunno how the two 'static's got lost :-) Have fun. Benjamin PS: By the way: if any of you guys who really know how to handle java-gnome (see... I just started using it and really dunno much 'bout it, yet!) could have a look at what I wrote concerning threads? http://java-gnome.sourceforge.net/cgi-bin/bin/view/Main/MultiThreaded Just in case that's stuuupid, too :-) > Hi, >=20 > I understand that you are doing this in your free time and I appreciate > this. Sorry if my mail looked like a flame. >=20 > I changed the file and compiling now works! but now I get an error when I > run it: >=20 > $ java SimpleGladeExample >=20 > (java-gnome:7634): GConf-CRITICAL **: file gconf-client.c: line 547 > (gconf_client_add_dir): assertion `gconf_valid_key (dirname, NULL)' faile= d > org.gnu.glade.GladeXMLException: <property> element should be empty. Fou= nd > <b>. > at org.gnu.glade.LibGlade.glade_xml_new_from_buffer(Native Method) > at org.gnu.glade.LibGlade.<init>(LibGlade.java:123) > at SimpleGladeExample.<init>(SimpleGladeExample.java:20) > at SimpleGladeExample.main(SimpleGladeExample.java:35) >=20 > I don't have gnome installed (I use xfce), could this be the reason? I do= n't > need gnome for glade, do I? >=20 > Thanks, > David |