java-gnome

From Wikipedia, the free encyclopedia
Jump to: navigation, search
java-gnome
Stable release 4.1.3[1] / May 5, 2013 (2013-05-05)
Development status Active
Written in C and Java
Operating system UNIX-like
Type GUI language bindings for java
License GNU General Public License with exception.
Website java-gnome.sourceforge.net

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.

Up until version 2.0, java-gnome was written by a project team,[2] the current version 4.0 was originally an internal project of Operational Dynamics, a change management consultancy group.[3] This new version is a complete re-write of java-gnome and was originally written for creating business tools to the company's clients, but eventually grew into a full replacement Java language binding for GNOME.

Unlike most other GTK+ bindings, there is no version available for Microsoft Windows.

Java-gnome is free software released under the terms of the GNU General Public License.[4]

Example[edit]

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 (and all Debian-based distributions) in the libjava-gnome-java[5] package, which can be found in the official repositories (the jar is installed under the /usr/share/java path).

java-gnome GtkExample
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 {
  public GdkSimple() {
    setTitle("Example");
    connect(new Window.DeleteEvent() {
      public boolean onDeleteEvent(Widget source, Event event) {
        Gtk.mainQuit();
        return false;
      }
    });
    setDefaultSize(250, 150);
    setPosition(WindowPosition.CENTER);
    show();
  }
  public static void main(String[] args) {
    Gtk.init(args);
    new GdkSimple(); 
    Gtk.main(); 
  } 
}

See also[edit]

References[edit]

  1. ^ http://ftp.gnome.org/pub/gnome/sources/java-gnome/
  2. ^ For the current list of developers see AUTHORS
  3. ^ java-gnome 4.0: About. Accessed 2009-08-31.
  4. ^ COPYING file at the source repository
  5. ^ libjava-gnome-java package

External links[edit]