aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma/Libgamma.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libgamma/Libgamma.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/libgamma/Libgamma.java b/libgamma/Libgamma.java
new file mode 100644
index 0000000..98e086c
--- /dev/null
+++ b/libgamma/Libgamma.java
@@ -0,0 +1,30 @@
+/* See LICENSE file for copyright and license details. */
+package libgamma;
+
+
+/**
+ * Library initialisation class
+ */
+class Libgamma
+{
+ /**
+ * Initialise the library
+ */
+ static void initialise()
+ {
+ if (Libgamma.initialised)
+ return;
+ Libgamma.initialised = true;
+
+ try {
+ System.loadLibrary("gamma-java");
+ } catch (Throwable err) {
+ throw new Error(err);
+ }
+ }
+
+ /**
+ * Whether {@link #initialise} has been invoked
+ */
+ private static boolean initialised = false;
+}