Build a jar for the Java side of the JNI interface
authorAlexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Thu, 12 Apr 2012 13:39:55 +0000 (09:39 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Apr 2012 13:39:55 +0000 (09:39 -0400)
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java/.gitignore
liblttng-ust-java/LTTngUst.java
liblttng-ust-java/Makefile.am
liblttng-ust-java/README

index 677373ea416b627ca5039cfcb00cbe99b6827e6d..e07ee50388c1928085fd2bd326d20baea86e09be 100644 (file)
@@ -1,2 +1,3 @@
 org_lttng_ust_LTTngUst.h
 org/
+liblttng-ust-java.jar
index d3f1edaf6bcebce493dd433c1f4dc8e664df9bcb..68ed120c1bddf3141989f154dfda2c7d786d093c 100644 (file)
@@ -18,7 +18,7 @@
 
 package org.lttng.ust;
 
-class LTTngUst {
+public class LTTngUst {
        public static native void tracepointString(String name, String arg);
        static {
                System.loadLibrary("lttng-ust-java");
index 9e01e045e34b78ef5c64cd423dccf6a8b83ec32b..7e1834a6cc6d1c6cd9b5ba74b8575ff34b324430 100644 (file)
@@ -7,10 +7,11 @@ liblttng_ust_java_la_SOURCES = LTTngUst.c org_lttng_ust_LTTngUst.h lttng_ust_jav
 dist_noinst_DATA = LTTngUst.java
 liblttng_ust_java_la_LIBADD = -lc -L$(top_builddir)/liblttng-ust/.libs -llttng-ust
 
-all: LTTngUst.class org_lttng_ust_LTTngUst.h
+all: LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar
 
 clean-local:
-       rm  org_lttng_ust_LTTngUst.h
+       rm org_lttng_ust_LTTngUst.h
+       rm liblttng-ust-java.jar
        rm -rf org/
 
 LTTngUst.class: LTTngUst.java
@@ -19,4 +20,7 @@ LTTngUst.class: LTTngUst.java
 org_lttng_ust_LTTngUst.h: LTTngUst.class
        javah org.lttng.ust.LTTngUst
 
+liblttng-ust-java.jar: LTTngUst.class
+       jar cf liblttng-ust-java.jar org/*
+
 endif
index 37834e691d3e2c1b5cf76b39201814e2976ecf8c..4b4d2c6ec45a99c217243661b1cdb47312540228 100644 (file)
@@ -10,3 +10,8 @@ dependency: openjdk-6-jdk
 
 dependency: gcj-4.4-jdk
 ./configure --with-java-jdk=/usr/lib/jvm/java-gcj --with-jni-interface
+
+
+After building, you can use the liblttng-ust-java.jar file in a Java project.
+It requires the liblttng-ust-java.so* files (which get installed when doing
+`make install') so make sure those are in the linker's library path.
This page took 0.027719 seconds and 4 git commands to generate.