Java-gnome






java-gnome is a set of language bindings for the Java programming language for use in the GNOME desktop environment. It is part of the official GNOME language bindings suite and provides a set of libraries allowing developers to write computer programs for GNOME using the Java programming language and the GTK+ cross-platform widget toolkit.

Development

Originally released on 08.10.1999 as version 0.2, it included the first bindings for Gnome and GTK. Up until version 2.0, java-gnome was written by a project team. The current version 4.0 was originally an internal project of , a change management consultancy group.
From 1999, the so-called 2.X series was the main project. After being abandoned by the main team for a time, the project was given to a new developer in 2006, due to development problems that came from many maintenance issues.
The last release of 2.0 versions was version 2.16.2. The coverage of these series never made it past GTK 2.6. This update was declared as “end of life” for the old project and was no longer maintained, and any contribution patches for versions older than 4.0 are no longer accepted.
Both 2.0 and 4.0 updates have similar style of coding, while package spaces, classes, and method names are different. Internals of project were changed from version 4.0, so they can't be accessed publicly.
Currently, the project is maintained by "". The leader of this latest team is , one of the principal architects for the java-gnome project.

Functions

Java-gnome uses Java programming language and Java based class system for creation of GUI parts. Each implemented package has a different function; packages used in version 4.0 are:
GTK - The widget toolkit itself.
GDK - Contains low level drawing primitives. The majority of drawing is done by Cairo.
Glib and Gobject - Containers for the rest of infrastructure that allow the use of OOP.
Pango - Text layout engine.
ATK - Accessibility toolkit that allows extra control with computer controls.
GtkSourceView - Source code highlighter.
LibNotify - Warning notifier.
GtkSpell - Spellchecker.
LibUnique - Library that helps to maintain one working instance of an application.

Support

Java-gnome is only supported in Linux and Unix distributions, unlike most other GTK+ bindings, that are supported by other systems. Distribution specific instructions are available for:
Semi-finished instructions are available for Open Solaris and Fedora Core Linux distributions.

Licensing

Java-gnome is free software released under the terms of the GNU General Public License version 2.

Example

To compile a java-gnome class it's necessary to add the gtk-4.1.jar jar in the classpath. The jar is available on Debian in the libjava-gnome-java package, which can be found in the official repositories.

package org.wikipedia.javagnome.example;
import org.gnome.gdk.Event;
import org.gnome.gtk.Gtk;
import org.gnome.gtk.Widget;
import org.gnome.gtk.Window;
import org.gnome.gtk.WindowPosition;
/**
* Java-Gnome GTK Example
* ispired official site java-gnome.sourceforge.net
*/
public class GdkSimple extends Window