Add ust java bindings
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 25 Sep 2009 15:55:48 +0000 (11:55 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 25 Sep 2009 15:55:48 +0000 (11:55 -0400)
This first version is less efficient than the native ust. Moreover, all
java events share the same native event name.

configure.ac
java/Makefile.am [new file with mode: 0644]
java/UST.java [new file with mode: 0644]

index 88266f5a4ade2e34faf7ab63692d38a7561efc8d..9137366551d363462ce60182114719c3b8402c8d 100644 (file)
@@ -88,5 +88,6 @@ AC_CONFIG_FILES([
        libinterfork/Makefile
        ustd/Makefile
        ust/Makefile
+       java/Makefile
 ])
 AC_OUTPUT
diff --git a/java/Makefile.am b/java/Makefile.am
new file mode 100644 (file)
index 0000000..e818b81
--- /dev/null
@@ -0,0 +1,15 @@
+INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust $(KCOMPAT_CFLAGS) $(URCU_CFLAGS)
+
+lib_LTLIBRARIES = libustjava.la
+libustjava_la_SOURCES = UST.c UST.h
+noinst_DATA = UST.java
+libustjava_la_LIBADD = -lc -L$(top_builddir)/libust/.libs -lust
+
+all: UST.class
+
+clean-local:
+       rm -rf UST.h UST.class
+
+UST.class: UST.java
+       javac UST.java
+
diff --git a/java/UST.java b/java/UST.java
new file mode 100644 (file)
index 0000000..be5f7c7
--- /dev/null
@@ -0,0 +1,9 @@
+import java.util.*;
+
+class UST {
+       public static native void ust_java_event(String name, String arg);
+       static {
+               System.loadLibrary("ustjava");
+       }
+}
+
This page took 0.025695 seconds and 4 git commands to generate.