Java-GNOME Frequently Asked Questions


Where can I find ...?

Q: Where can I find the latest version of this document?
Q: How do I submit questions for this FAQ?
Q: Where can I find the latest version Java-GTK?
Q: Where can I find the latest version Java-GNOME?
Q: What is the difference between Java-GTK and Java-GNOME?
Q: Do I need GNOME to use Java-GTK?
Q: Do I need GNOME to use Java-GNOME?
Q: How can I build only Java-GTK?
Q: Why can't Java-GTK and Java-GNOME be installed at the same time?
Q: Which version of GTK and GNOME do you use?
Q: Does Java-GNOME work for Vendor X's JDK/JRE version Y?
Q: Does Java-GNOME work with kaffe?
Q: Can Java-GNOME read glade files like libglade?
Q: Where can I submit a bug / feature request?
Q: How do I fix the following error?
Q: What are the requirements for compiling Java-GNOME with GCJ?
Q: How do I compile Java-GNOME with GCJ?
Q: How do I compile the examples using gcj?

Q: Where can I find the latest version of this document?

A: You can find the latest version of Java-GNOME and the FAQ at: http://java-gnome.sourceforge.net.

Q: How do I submit questions for this FAQ?

A: You can submit questions to the FAQ by sending them to the java-gnome-developer mailing list. Use the following email address for the list: .

This list is a good place for discussions about using Java-GTK and Java-GNOME. You can subscribe to the list at: http://lists.sourceforge.net/mailman/listinfo/java-gnome-developer. You can find the list archives at: http://www.geocrawler.com/lists/3/SourceForge/7036/0/.

Q: Where can I find the latest version Java-GTK?

A: Java-GTK is part of Java-GNOME and can be found at: http://java-gnome.sourceforge.net.

Q: Where can I find the latest version Java-GNOME?

A: You can find the latest version of Java-GNOME and the FAQ at: http://java-gnome.sourceforge.net.

Q: What is the difference between Java-GTK and Java-GNOME?

A: Java-GTK and Java-GNOME can be built from the same source. We split Java-GNOME into Java-GTK which only contains GLib, ATK, Pango, GDK and GTK objects and Java-GNOME which contains all the GNOME stuff. There is no seperate project called Java-GTK.

Q: Do I need GNOME to use Java-GTK?

A: No, you do not need GNOME to use Java-GTK. But you need GLib, ATK, Pango, GDK and GTK to use Java-GTK.

Q: Do I need GNOME to use Java-GNOME?

A: Yes, you need GNOME to use Java-GNOME.

Q: How can I build only Java-GTK?

A: To build the GTK bindings only, pass the --with-gtk-only flag to configure.

Q: Why can't Java-GTK and Java-GNOME be installed at the same time?

A: If you install Java-GNOME you have all of the libraries included in Java-GTK.

Q: Which version of GTK and GNOME do you use?

A: Currently Java-GNOME is being built using

  • gtk+-2.0 - 2.0or higher

  • libgnomeui-2.0 - 1.108 or higher

  • libglade-2.0 - 1.99 or higher

Q: Does Java-GNOME work for Vendor X's JDK/JRE version Y?

A: Currently Java-GNOME has been tested and found working on the following JDK's

  • Blackdown's JDK 1.1.7

  • IBM's JDK 1.1.8

  • Blackdown 1.3.0-FCS (Java 2)

  • IBM's JDK 1.3 (Java 2)

  • Sun's JDK 1.3 (Java 2)

  • Kaffe 1.0.5 (See next question and answer)

If you know of any other JDK/JRE's that Java-GNOME works with please let us know.

Q: Does Java-GNOME work with kaffe?

A:

Important

New. Java-GNOME now works with kaffe, but does not (yet) compile with kaffe. The following workaround were tested with kaffe-1.0.5-3 on a RedHat 6.2 system.

Update. Java-GNOMEunderstands about using kaffe for comiplation but we were not able to get it to compile. If you have used kaffe to compile java files and are willing to help please contact us.

Yes, it actually works better than IBM JDK 1.1.8. You can either set the environment variable LD_LIBRARY_PATH or you will have to create a few links (as root) to get it working.

Create links from your kaffe library directory (/usr/lib/kaffe on my system) to libGTKJava.so for Java-GTK and to libGTKJava.so and libGNOMEJava.so for Java-GNOME or set your LD_LIBRARY_PATH so that it includes the path to the above libraries.

On my system this means that I had to do the following to get it running:

cd /usr/lib/kaffe
ln -s /usr/lib/libGNOMEJava.so
ln -s /usr/lib/libGTKJava.so
or
export LD_LIBRARY_PATH=/usr/lib

I then changed to the /usr/share/java-gnome/test dir and ran:

kaffe -addclasspath ../gtk.jar:../gnome.jar:. TestGNOME
and saw the pretty examples.

Q: Can Java-GNOME read glade files like libglade?

A: Yes. Java-GNOME can do it. See the examples directory for some examples.

Q: Where can I submit a bug / feature request?

A: You can submit all bugs / feature requests on sourceforge (http://java-gnome.sourceforge.net) or on the java-gnome-developer mailing list. Use the following email address for the list: .

This list is a good place for discussions about using Java-GTK and Java-GNOME. You can subscribe to the list at: http://lists.sourceforge.net/mailman/listinfo/java-gnome-developer. You can find the list archives at: http://www.geocrawler.com/lists/3/SourceForge/7036/0/.

Important

When submitting a bug please include as much as possible of the following:

  • The output from which java

  • The output from java --version

  • The supplier of the JDK eg.: Sun, IBM, Blackdown, etc.

  • The place where you installed Java

  • The output from echo $PATH

  • Full path and current directory when running java

  • As full a description of the problem as possible

  • The Java-GNOME/GTK version

Q: How do I fix the following error?

lib/libGTKJava.so.0.x.y: undefined symbol:
gnome_entry_max_saved
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
      at java.lang.Runtime.loadLibrary0(Runtime.java:749)
      at java.lang.System.loadLibrary(System.java:820)
      at gnu.gtk.Gtk.<clinit>(Gtk.java:23)
      at TestGTK.main(TestGTK.java:412)

A: The most common error of this type is caused by the fact that your system can not find the libraries it needs to load. Try to run make install as root and ensure that the directory the two libraries (libGtkJava.so and libGNOMEJava.so) end up in is in the dynamic loader's path.

If you did this and it still gives you the same error message please contact us. Also see Q: Q:.

Q: What are the requirements for compiling Java-GNOME with GCJ?

A: In order to compile Java-GNOME with GCJ for binary support you must have GCJ release 3.0.0 or higher and a JDK.

Q: How do I compile Java-GNOME with GCJ?

A: There are a few arguments to the configure script that will facilitate the build. They are --with-gcj-compile (compile the bindings with native gcj support) and --with-gcj-prefix (specify the root directory fo the gcc tree which contains gcj). If gcj is in your path you should just be able to type "./configure --with-gcj-compile". The build process will generate the java and jni code and compile the java and C code. This part of the build will use your standard JDK and C compiler. Once this is complete it will compile the java code into a shared object using gcj with the jni feature.

Q: How do I compile the examples using gcj?

A: In order to compile the examples using gcj you must first build the bindings using the "--with-gcj-compile" option. You then should be able to compile the examples using the following command:

gcj -fPIC -fjni -g -O -o Calculator --main=Calculator \
-Lpath to shared objects Calculator.java -lGTKJAR -lGNOMEJAR