Java module API

The Java gobo module provides a set of JNI callbacks for Java classes to access the GridLAB-D core with native calls. Java modules will need to import gridlabd.* and contain at least two classes, one for the module, which will need to extend or wrap GModule, and one for each constituant class, each of which will need to extend or wrap GObject.

Most of the familiar gl_* function calls and constants in C/C++ modules can be made from Java using GridlabD.*, such as GridlabD.error() and GridlabD.TS_NEVER. Class registration is made through static calls to GClass, and Gridlab object construction through static GObject methods.

Java modules must be careful to handle any exceptions internally, as uncaught exceptions may have unexpected consequences within the JVM.


GridLAB-DTM Version 2.0
An open-source project initiated by the US Department of Energy