Skip to content

Welcome to Java-GI

Java-GI generates Java bindings for native libraries including Gtk, LibAdwaita, GtkSourceview, WebkitGtk and GStreamer using GObject-Introspection data. The bindings use the new Foreign Function & Memory API (JEP-454) to directly access native resources from inside the JVM.

Screenshot of Java-GI code with the Browser example

Please note that Java-GI is still under active development. Feedback is welcome.

How to use

Supported

Java-GI version 0.10 requires OpenJDK 22 or newer. Version 0.8.x and 0.9.x require OpenJDK 21, and version 0.7.2 works with OpenJDK 20. They have been built with the following library versions:

Library Java-GI 0.10.x Java-GI 0.8.x and 0.9.x Java-GI 0.7.x
OpenJDK 22 21 20
GLib 2.80 2.78 2.76
GTK 4.14 4.12 4.10
LibAdwaita 1.5 1.4 1.3
GStreamer 1.22 1.22 1.20
GtkSourceview 5.12 5.10 5.9
WebkitGtk 2.44 2.42 2.41

The Java bindings for these libraries are available from Maven Central.

API documentation

Java-GI converts API documentation from GObject-Introspection to Javadoc. For the library bindings published by Java-GI 0.10.0, the Javadoc is available here.

JAR files with the Javadoc and source code, to use offline in your IDE, are available from Maven Central.

Example apps

You can find example applications in the java-gi-examples repository.

Contributing

To build Java-GI for yourself, make changes, or use Java-GI to generate bindings for other (GObject-Introspection based) libraries, follow the instructions here. Please log issues, questions and requests on Github, or join the discussion on Matrix.