Java-gnome

Java-gnome
Initial release0.99[1] / January 20, 1999
Stable release
4.1.3[2] / May 5, 2013 (2013-05-05)
Written inC and Java
Operating systemUNIX-like
TypeGUI language bindings for java
LicenseGNU General Public License with exception.
Websitejava-gnome.sourceforge.net
Repository

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 programs for GNOME using Java and the GTK cross-platform widget toolkit.

Development

Originally released on 8 October 1999 as version 0.2, it included the first bindings for Gnome and GTK. Until version 2.0, java-gnome was written by a group of online contributors.[3] Development of this codebase by 5 successive teams continued up to version 2.16.2 supporting GTK 2.6, after which development ceased for several years, and was ultimately discontinued.[4]

The current version, 4.0, was originally an internal project of Operational Dynamics, a change management consultancy group.[5] The 2.0 and 4.0 versions have similar APIs, but specific names (of e.g. packages, classes, and methods) are different, and internal code in 4.0 is encapsulated and not externally visible.[4]

The project is currently maintained by "java gnome Hackers". The leader of this latest team is Andrew Cowie, one of the principal architects for the java-gnome project.[6][7]

Functions

Java-gnome provides access to various GNOME libraries using idiomatic class-based bindings. The provided libraries in version 4.0 include:

  • 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.
  • GtkSourceView - Source code highlighter.
  • LibNotify - Warning notifier.
  • GtkSpell - Spellchecker.
  • LibUnique - Enforces that only one instance of a program is open simultaneously.

Support

Java-gnome is only supported in Linux and Unix distributions, unlike most other GTK bindings that are supported by other operating 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.[8]

Example

To compile a java-gnome class, it is 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[9] 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
 * inspired 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

  1. ^ "Index of /web/20010202155200/http://java-gnome.sourceforge.net/News/news.html". Archived from the original on 2001-02-02.
  2. ^ "Index of /pub/gnome/sources/java-gnome". ftp.gnome.org.
  3. ^ For the current list of developers see AUTHORS Archived 2011-02-08 at the Wayback Machine
  4. ^ a b "java-gnome 2.x". 2007-03-03. Archived from the original on 2007-03-03. Retrieved 2019-04-28.
  5. ^ java-gnome 4.0: About Archived 2009-07-21 at the Wayback Machine. Accessed 2009-08-31.
  6. ^ "Andrew Cowie in Launchpad". launchpad.net. 12 February 2008. Retrieved 2019-04-28.
  7. ^ "AUTHORS". java-gnome.sourceforge.net. Archived from the original on 2023-06-01. Retrieved 2019-04-28.
  8. ^ . 2017-07-04 https://web.archive.org/web/20170704205150/http://research.operationaldynamics.com/bzr/java-gnome/mainline/COPYING. Archived from the original on 2017-07-04. Retrieved 2019-04-28. {{cite web}}: Missing or empty |title= (help)
  9. ^ libjava-gnome-java package

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.