Java-gnome
Java-gnome | |
---|---|
Initial release | August 10 1999[1] |
Stable release | 4.1.3[2]
/ May 5, 2013 |
Repository | |
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 |
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 including the first bindings for Gnome and GTK.Up until version 2.0, java-gnome was written by a project team,[3] the current version 4.0 was originally an internal project of Operational Dynamics, a change management consultancy group.[4]
From 1999 to 2006, so called 2.X series was the main project . After project being abandoned by the main team for a time, the project was given to a new developer. The reason for this change was the development problems that came from many maintenance problems and original project being abandoned for an extended period of time. [5]
Last release of 2.0 versions that continued the same project from version 0.2 was version 2.16.2(called 2.x series) the coverage of these series never made it past GTK 2.6 version. This update was declared as “end of life” for the old project and was no longer maintained, any contribution patches for for versions older than 4.0 are no longer accepted.
While both 2.0 and 4.0 updates have similar style of coding while package spaces,classes,method names are very different. Internals of project were changed from version 4.0 so they cannot be accessed publicly.[6]
Currently the project is maintained by "Java-gnome hackers" owner of this latest team is Andrew Cowie, one of the principal architects for the java-gnome project.[7][8]
Functions
Java-gnome uses Java programming language and Java based class system for creation of GUI parts, each package that is implemented has a different functions, these are the packages used in update 4.0[9]:
GTK- 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 - Accesibility toolkit that allows extra control with computer controls
GtkSourceView - source code highliter
LibNotify - warning notifier
GtkSpell- Spellchecking
LibUnique - library that helps to maintain one working instance of an application
Support
Unlike most other GTK+ bindings, that are supported by other systems java-gnome is only supported in Linux and Unix distributions. Distribution specific instructions are available for:
Semi-finished instructions are available for Open Solaris and Feodra Core linux distributions.
Licensing
Java-gnome is free software released under the terms of the GNU General Public License version 2.[10]
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 (and all Debian-based distributions) in the libjava-gnome-java[11] package, which can be found in the official repositories (the jar is installed under the /usr/share/java path).

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((DeleteEvent)(source, 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
References
- ^ "Index of /web/20010202155200/http://java-gnome.sourceforge.net/News/news.html". web.archive.org.
- ^ "Index of /pub/gnome/sources/java-gnome". ftp.gnome.org.
- ^ For the current list of developers see AUTHORS
- ^ java-gnome 4.0: About Archived 2009-07-21 at the Wayback Machine. Accessed 2009-08-31.
- ^ "java-gnome 2.x". web.archive.org. 2007-03-03. Retrieved 2019-04-28.
- ^ "java-gnome 2.x". web.archive.org. 2007-03-03. Retrieved 2019-04-28.
- ^ "Andrew Cowie in Launchpad". launchpad.net. Retrieved 2019-04-28.
- ^ "AUTHORS". java-gnome.sourceforge.net. Retrieved 2019-04-28.
- ^ "java-gnome 4.1.3 API Documentation". java-gnome.sourceforge.net. Retrieved 2019-04-28.
- ^ "Wayback Machine". web.archive.org. 2017-07-04. Retrieved 2019-04-28.
- ^ libjava-gnome-java package