Thread: [Java-gnome-developer] libGTKJava Error
Brought to you by:
afcowie
From: ACJT <ac...@on...> - 2003-11-06 22:30:41
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm new to this java-gnome work, but I am a Java developer and I like how GTK looks and feels better than swing (plus swing performance bites) so I thought I'd try it out. I was looking through previous posts and saw there is an Eclipse plugin, great because I use eclipse. So I sparked it up and built the default app - fine. When I try to run it, of course I get this error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no GTKJava in java.library.path ~ at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) ~ at java.lang.Runtime.loadLibrary0(Runtime.java:788) ~ at java.lang.System.loadLibrary(System.java:834) ~ at org.gnu.glib.GObject.<clinit>(GObject.java:154) ~ at org.you.gnome.simpleapp.GnomeAppMain.main(GnomeAppMain.java:37) So, I set LD_LIBRARY_PATH=/usr/local/lib because that is where libGTKJava.so is. If I run the class from the console, it works fine and my window opens, however if I try to run it from Eclipse, I continually get the error. Is there a way (other than adding - -Djava.library.path=/usr/local/lib to my application runner ) to get this to work from eclipse? I am quite suprised that it didn't work by setting the environment variable in .bash_profile!! Oh, another quicky, is it possible to use Glade to build a GUI, then use java-gnome with the glade code? I haven't gone thoroughly through any example code yet or anything, but thought there might be a document that outlined this perhaps?? Thanks. - -- [A n d r e w] - ------|------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/qsz02AKtqeH2FeQRApDuAJwNvTWC3gFl08sF2zxUAY4VpSCGKQCaA6ts mhfrsNJFxOyU6Ss04GoRhAI= =C3q3 -----END PGP SIGNATURE----- |
From: Dan P. <pi...@sl...> - 2003-11-07 01:52:28
|
On Thu, 2003-11-06 at 17:36, ACJT wrote: > I was looking through previous posts and saw there is an Eclipse > plugin, great because I use eclipse. > So I sparked it up and built the default app - fine. > When I try to run it, of course I get this error: I'm the author of the eclipse plugin, so hopefully I can help here. First, to be honest, I haven't found a way to get it to find that library without doing the -Djava.library.path.... in the app launcher. I have printed out the default value of that property and sure enough, it only points to the JRE libs. I'm not sure why, but haven't had any luck yet. Sorry. For right now, you'll have to add the -D option.. > Oh, another quicky, is it possible to use Glade to build a GUI, then > use java-gnome with the glade code? I haven't gone thoroughly through > any example code yet or anything, but thought there might be a > document that outlined this perhaps?? Yup that works fine. There is a Wizard to make a GladeApp included with the Eclipse plugin. When you do "File->New" select the glade app. This will produce a stub application with a very simple glade xml file to demonstrate how to use it. Note that there is one "bug" in the example. I do a GTK.init instead of GnomeApp.init in the main loop. I have fixed it locally but haven't posted the new ones on the web site yet. I'll put it up shortly. Yell if something doesn't make sense/work. -- Dan |
From: Luca De R. <pie...@li...> - 2003-11-07 16:44:23
|
Il ven, 2003-11-07 alle 02:51, Dan Pilone ha scritto: > On Thu, 2003-11-06 at 17:36, ACJT wrote: > > I was looking through previous posts and saw there is an Eclipse > > plugin, great because I use eclipse. > > So I sparked it up and built the default app - fine. > > When I try to run it, of course I get this error: > > I'm the author of the eclipse plugin, so hopefully I can help here. > First, to be honest, I haven't found a way to get it to find that > library without doing the -Djava.library.path.... in the app launcher. > I have printed out the default value of that property and sure enough, > it only points to the JRE libs. I'm not sure why, but haven't had any > luck yet. Sorry. For right now, you'll have to add the -D option.. Strange, I've finally installed eclipse and I used it right now to finish my first java-gnome app :), and I can compile and run with a button click. The only thing I've done was add external jar files (gnome.jar, gtk.jar, glade.jar) from the "Project/Properties/Java build path/Libraries". But I also have my CLASSPATH and my LD_LIBRARY_PATH pointing to the java-gnome jars and /usr/lib respectively, in my .bash_profile. > > Oh, another quicky, is it possible to use Glade to build a GUI, then > > use java-gnome with the glade code? I haven't gone thoroughly through > > any example code yet or anything, but thought there might be a > > document that outlined this perhaps?? > > Yup that works fine. There is a Wizard to make a GladeApp included > with the Eclipse plugin. When you do "File->New" select the glade app. > This will produce a stub application with a very simple glade xml file > to demonstrate how to use it. Note that there is one "bug" in the You can find an example of using glade in the CroMagnom app shipped with java-gnome. It doesn't compile with latest java-gnome but I'm working on it. Actually it compiles, but I have the CrontabEntryEdit window still not working perfectly. I'll post it when I've done. Maybe someone wants to help? :) Andrew you can find the glade stuff in the CrontabEntryEdit.java file. Luca. -- Luca De Rugeriis <pie...@li...> |
From: Fernando L. <fer...@lo...> - 2003-11-08 03:18:11
|
Luca, >Strange, I've finally installed eclipse and I used it right now to >finish my first java-gnome app :), and I can compile and run with a >button click. >The only thing I've done was add external jar files (gnome.jar, gtk.jar, >glade.jar) from the "Project/Properties/Java build path/Libraries". But >I also have my CLASSPATH and my LD_LIBRARY_PATH pointing to the >java-gnome jars and /usr/lib respectively, in my .bash_profile. > > Eclipse projects won't see any changes to CLASSPATH and LD_LIBRARY_PATH. Eclipse itself will see, but it generated a brand new environment when running classes from workspace's projects. []s, Fernando Lozano |
From: ACJT <ac...@on...> - 2003-11-07 17:57:25
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I hope I'm not a pain here, but I am new at this. I created a simple glade window with 2 buttons on it. I copied the .glade file to my eclipse directory, updated the constant in the java code, but when I run, I get this error. Anyone got an idea? - ------------------------------- An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4D05765F Function=glade_xml_set_value_from_string+0x54F Library=/usr/lib/libglade-2.0.so.0 Current Java thread: ~ at org.gnu.glade.LibGlade.glade_xml_new_from_buffer(Native Method) ~ at org.gnu.glade.LibGlade.<init>(LibGlade.java:117) ~ at org.gnu.glade.LibGlade.<init>(LibGlade.java:88) ~ at org.gnu.glade.LibGlade.<init>(LibGlade.java:60) ~ at org.you.gnome.gladeapp.MainWindow.<init>(MainWindow.java:33) ~ at org.you.gnome.gladeapp.GladeAppMain.main(GladeAppMain.java:17) Dynamic libraries: 08048000-0804e000 r-xp 00000000 03:09 16340 /usr/lib/j2sdk1.4.2_01/bin/java 0804e000-0804f000 rw-p 00005000 03:09 16340 /usr/lib/j2sdk1.4.2_01/bin/java 40000000-40015000 r-xp 00000000 03:08 10118 /lib/ld-2.3.2.so 40015000-40016000 rw-p 00014000 03:08 10118 /lib/ld-2.3.2.so 40016000-4001e000 r-xp 00000000 03:09 16822 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/native_threads/libhpi.so 4001e000-4001f000 rw-p 00007000 03:09 16822 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/native_threads/libhpi.so 4001f000-40023000 rw-s 00000000 03:08 15446 /tmp/hsperfdata_at/3312 40025000-40033000 r-xp 00000000 03:08 10134 /lib/libpthread-0.10.so 40033000-40036000 rw-p 0000e000 03:08 10134 /lib/libpthread-0.10.so 40076000-40078000 r-xp 00000000 03:08 10123 /lib/libdl-2.3.2.so 40078000-40079000 rw-p 00001000 03:08 10123 /lib/libdl-2.3.2.so 40079000-401a8000 r-xp 00000000 03:08 10121 /lib/libc-2.3.2.so 401a8000-401ad000 rw-p 0012f000 03:08 10121 /lib/libc-2.3.2.so 401af000-405a9000 r-xp 00000000 03:09 16826 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/client/libjvm.so 405a9000-405c5000 rw-p 003f9000 03:09 16826 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/client/libjvm.so 405d7000-405e9000 r-xp 00000000 03:08 10126 /lib/libnsl-2.3.2.so 405e9000-405ea000 rw-p 00011000 03:08 10126 /lib/libnsl-2.3.2.so 405ec000-4060e000 r-xp 00000000 03:08 10124 /lib/libm-2.3.2.so 4060e000-4060f000 rw-p 00021000 03:08 10124 /lib/libm-2.3.2.so 4060f000-40612000 r--s 00000000 03:09 16805 /usr/lib/j2sdk1.4.2_01/jre/lib/ext/dnsns.jar 40612000-4061a000 r--s 00000000 03:09 139315 /usr/local/share/java-gnome/glade-0.8.1.jar 4061a000-4061c000 r-xp 00000000 03:09 57020 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2 4061c000-4061d000 rw-p 00001000 03:09 57020 /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2 4061d000-40628000 r-xp 00000000 03:08 10127 /lib/libnss_compat-2.3.2.so 40628000-40629000 rw-p 0000a000 03:08 10127 /lib/libnss_compat-2.3.2.so 40629000-40639000 r-xp 00000000 03:09 16815 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libverify.so 40639000-4063b000 rw-p 0000f000 03:09 16815 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libverify.so 4063b000-4065b000 r-xp 00000000 03:09 16830 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libjava.so 4065b000-4065d000 rw-p 0001f000 03:09 16830 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libjava.so 4065d000-40671000 r-xp 00000000 03:09 16820 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libzip.so 40671000-40674000 rw-p 00013000 03:09 16820 /usr/lib/j2sdk1.4.2_01/jre/lib/i386/libzip.so 40674000-4200c000 r--s 00000000 03:09 16934 /usr/lib/j2sdk1.4.2_01/jre/lib/rt.jar 42056000-4206c000 r--s 00000000 03:09 16893 /usr/lib/j2sdk1.4.2_01/jre/lib/sunrsasign.jar 4206c000-42147000 r--s 00000000 03:09 16869 /usr/lib/j2sdk1.4.2_01/jre/lib/jsse.jar 42147000-42158000 r--s 00000000 03:09 16940 /usr/lib/j2sdk1.4.2_01/jre/lib/jce.jar 42158000-426b1000 r--s 00000000 03:09 16932 /usr/lib/j2sdk1.4.2_01/jre/lib/charsets.jar 44759000-4475c000 r-xp 00000000 03:09 1300 /usr/lib/libgmodule-2.0.so.0.200.3 4475c000-4475d000 rw-p 00002000 03:09 1300 /usr/lib/libgmodule-2.0.so.0.200.3 4475d000-4475f000 r-xp 00000000 03:09 139313 /usr/local/lib/libGladeJava.so.0.8.1 4475f000-44760000 rw-p 00001000 03:09 139313 /usr/local/lib/libGladeJava.so.0.8.1 4c7e0000-4c7fc000 r--s 00000000 03:09 16806 /usr/lib/j2sdk1.4.2_01/jre/lib/ext/sunjce_provider.jar 4c7fc000-4c809000 r--s 00000000 03:09 16807 /usr/lib/j2sdk1.4.2_01/jre/lib/ext/ldapsec.jar 4c809000-4c8c5000 r--s 00000000 03:09 16808 /usr/lib/j2sdk1.4.2_01/jre/lib/ext/localedata.jar 4c8c5000-4c8dc000 r--s 00000000 03:09 138813 /usr/local/share/java-gnome/gnome-0.8.1.jar 4c8dc000-4c94e000 r--s 00000000 03:09 138811 /usr/local/share/java-gnome/gtk-0.8.1.jar 4c94e000-4c9cb000 r-xp 00000000 03:09 138807 /usr/local/lib/libGTKJava.so.0.8.1 4c9cb000-4c9ce000 rw-p 0007d000 03:09 138807 /usr/local/lib/libGTKJava.so.0.8.1 4c9dc000-4cc26000 r-xp 00000000 03:09 45867 /usr/lib/libgtk-x11-2.0.so.0.200.4 4cc26000-4cc2f000 rw-p 0024a000 03:09 45867 /usr/lib/libgtk-x11-2.0.so.0.200.4 4cc31000-4cc98000 r-xp 00000000 03:09 45812 /usr/lib/libgdk-x11-2.0.so.0.200.4 4cc98000-4cc9d000 rw-p 00067000 03:09 45812 /usr/lib/libgdk-x11-2.0.so.0.200.4 4cc9d000-4ccb5000 r-xp 00000000 03:09 42652 /usr/lib/libatk-1.0.so.0.400.1 4ccb5000-4ccb7000 rw-p 00018000 03:09 42652 /usr/lib/libatk-1.0.so.0.400.1 4ccb7000-4ccc9000 r-xp 00000000 03:09 45869 /usr/lib/libgdk_pixbuf-2.0.so.0.200.4 4ccc9000-4ccca000 rw-p 00012000 03:09 45869 /usr/lib/libgdk_pixbuf-2.0.so.0.200.4 4ccca000-4ccea000 r-xp 00000000 03:09 51358 /usr/lib/libpangoxft-1.0.so.0.200.5 4ccea000-4cceb000 rw-p 0001f000 03:09 51358 /usr/lib/libpangoxft-1.0.so.0.200.5 4cceb000-4ccf7000 r-xp 00000000 03:09 51414 /usr/lib/libpangox-1.0.so.0.200.5 4ccf7000-4ccf8000 rw-p 0000b000 03:09 51414 /usr/lib/libpangox-1.0.so.0.200.5 4ccf8000-4cd1f000 r-xp 00000000 03:09 51412 /usr/lib/libpango-1.0.so.0.200.5 4cd1f000-4cd2b000 rw-p 00026000 03:09 51412 /usr/lib/libpango-1.0.so.0.200.5 4cd2b000-4cd5e000 r-xp 00000000 03:09 1295 /usr/lib/libgobject-2.0.so.0.200.3 4cd5e000-4cd60000 rw-p 00032000 03:09 1295 /usr/lib/libgobject-2.0.so.0.200.3 4cd60000-4cdc9000 r-xp 00000000 03:09 1291 /usr/lib/libglib-2.0.so.0.200.3 4cdc9000-4cdca000 rw-p 00069000 03:09 1291 /usr/lib/libglib-2.0.so.0.200.3 4cdca000-4cea2000 r-xp 00000000 03:09 93336 /usr/lib/libiconv.so.2.2.0 4cea2000-4cea3000 rw-p 000d7000 03:09 93336 /usr/lib/libiconv.so.2.2.0 4cea3000-4cf67000 r-xp 00000000 03:09 57369 /usr/X11R6/lib/libX11.so.6.2 4cf67000-4cf6a000 rw-p 000c3000 03:09 57369 /usr/X11R6/lib/libX11.so.6.2 4cf6a000-4cf6d000 r-xp 00000000 03:09 57158 /usr/X11R6/lib/libXrandr.so.2.0 4cf6d000-4cf6e000 rw-p 00002000 03:09 57158 /usr/X11R6/lib/libXrandr.so.2.0 4cf6e000-4cf7b000 r-xp 00000000 03:09 57166 /usr/X11R6/lib/libXext.so.6.4 4cf7b000-4cf7c000 rw-p 0000c000 03:09 57166 /usr/X11R6/lib/libXext.so.6.4 4cf7c000-4cf8d000 r-xp 00000000 03:09 57178 /usr/X11R6/lib/libXft.so.2.1 4cf8d000-4cf8e000 rw-p 00010000 03:09 57178 /usr/X11R6/lib/libXft.so.2.1 4cf8e000-4cf95000 r-xp 00000000 03:09 57370 /usr/X11R6/lib/libXrender.so.1.2 4cf95000-4cf96000 rw-p 00006000 03:09 57370 /usr/X11R6/lib/libXrender.so.1.2 4cf96000-4cfb9000 r-xp 00000000 03:09 66207 /usr/X11R6/lib/libfontconfig.so.1.0.4 4cfb9000-4cfbc000 rw-p 00023000 03:09 66207 /usr/X11R6/lib/libfontconfig.so.1.0.4 4cfbd000-4d01a000 r-xp 00000000 03:09 66107 /usr/X11R6/lib/libfreetype.so.6.3.4 4d01a000-4d021000 rw-p 0005d000 03:09 66107 /usr/X11R6/lib/libfreetype.so.6.3.4 4d021000-4d02c000 r-xp 00000000 03:09 1303 /usr/lib/libz.so.1.1.4 4d02c000-4d02e000 rw-p 0000b000 03:09 1303 /usr/lib/libz.so.1.1.4 4d02e000-4d04a000 r-xp 00000000 03:09 1286 /usr/lib/libexpat.so.0.4.0 4d04a000-4d04e000 rw-p 0001b000 03:09 1286 /usr/lib/libexpat.so.0.4.0 4d04e000-4d062000 r-xp 00000000 03:09 47169 /usr/lib/libglade-2.0.so.0.0.1 4d062000-4d063000 rw-p 00014000 03:09 47169 /usr/lib/libglade-2.0.so.0.0.1 4d063000-4d151000 r-xp 00000000 03:09 23778 /usr/lib/libxml2.so.2.5.11 4d151000-4d15c000 rw-p 000ed000 03:09 23778 /usr/lib/libxml2.so.2.5.11 Heap at VM Abort: Heap ~ def new generation total 576K, used 296K [0x44760000, 0x44800000, 0x44c40000) ~ eden space 512K, 57% used [0x44760000, 0x447aa2b0, 0x447e0000) ~ from space 64K, 0% used [0x447e0000, 0x447e0000, 0x447f0000) ~ to space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) ~ tenured generation total 1408K, used 0K [0x44c40000, 0x44da0000, 0x48760000) ~ the space 1408K, 0% used [0x44c40000, 0x44c40000, 0x44c40200, 0x44da0000) ~ compacting perm gen total 4096K, used 1131K [0x48760000, 0x48b60000, 0x4c760000) ~ the space 4096K, 27% used [0x48760000, 0x4887ad60, 0x4887ae00, 0x48b60000) Local Time = Fri Nov 7 18:00:05 2003 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode) # - -- [A n d r e w] - ------|------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/q95k2AKtqeH2FeQRAsG0AKCVOV5ONZhqu1AzUm9gUTBXvZvrhwCeIwQD p0gYtCFJ8pMJt6egA/WiEgc= =ICP0 -----END PGP SIGNATURE----- |
From: Luca De R. <pie...@li...> - 2003-11-08 17:56:13
|
Il ven, 2003-11-07 alle 19:03, ACJT ha scritto: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > I hope I'm not a pain here, but I am new at this. > I created a simple glade window with 2 buttons on it. I copied the > .glade file to my eclipse directory, > updated the constant in the java > code, What does this mean? I've found a good example of using a glade xml file in the cromagnon app (shipped with java-gnome) in the CrontabEntryEdit.java file. Good luck :) Luca. -- Luca De Rugeriis <pie...@li...> |
From: ACJT <ac...@on...> - 2003-11-09 16:13:13
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Luca De Rugeriis wrote: | Il ven, 2003-11-07 alle 19:03, ACJT ha scritto: | |> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 |> |> Hi, I hope I'm not a pain here, but I am new at this. I created a |> simple glade window with 2 buttons on it. I copied the .glade |> file to my eclipse directory, | | |> updated the constant in the java code, | | What does this mean? I've found a good example of using a glade xml | file in the cromagnon app (shipped with java-gnome) in the | CrontabEntryEdit.java file. Good luck :) | | Luca. | Further from this, I simply created a simple gtk window in glade, with 2 buttons, menu, using stock icons, and I get this when I run (in addition to the stack trace as before). I've no idea! - ---- (java-gnome:1952): GLib-CRITICAL **: file gutils.c: line 574 (g_path_get_dirname): assertion `file_name != NULL' failed (java-gnome:1952): GLib-CRITICAL **: file gstrfuncs.c: line 232 (g_strconcat): assertion `string1 != NULL' failed (java-gnome:1952): GdkPixbuf-CRITICAL **: file gdk-pixbuf-io.c: line 729 (gdk_pixbuf_new_from_file): assertion `filename != NULL' failed - -- [A n d r e w] - ------|------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/rmkB2AKtqeH2FeQRAqp5AJ9hD0rHWnko/mYz73b08DhdOQTOSACfSydG sd0bE6QJfUsHKVZB/13pUZM= =1UQ+ -----END PGP SIGNATURE----- |
From: Fernando L. <fer...@lo...> - 2003-11-08 03:17:56
|
Hi, >There is a Wizard to make a GladeApp included >with the Eclipse plugin. When you do "File->New" select the glade app. >This will produce a stub application with a very simple glade xml file >to demonstrate how to use it. Note that there is one "bug" in the >example. I do a GTK.init instead of GnomeApp.init in the main loop. I >have fixed it locally but haven't posted the new ones on the web site >yet. > This is not a bug. :-) I may not want a full Gnome application, just a plain GTK+ app. So there should be two wizzards, one generating GTK.init and other generating GnomeApp.init. []s, Fernando Lozano |