Fix: running java examples out of tree
[lttng-ust.git] / doc / examples / java-jul / run
CommitLineData
849202d4
DG
1#!/bin/bash
2
3#
4# The -cp path should be changed to the lttng ust JUL jar file on your system
5# or locally to the project. Same goes for the Java library path in order to
6# find the JNI JUL library.
7#
8
9DIR=`dirname $0`
501f6777 10JARFILE="liblttng-ust-agent.jar"
eb2cc622 11JAVA_OPTIONS=""
849202d4
DG
12
13cd $DIR
14
15if [ -f "$DIR/.intree" ]; then
501f6777
CB
16 CLASSPATH="../../../liblttng-ust-java-agent/java/$JARFILE"
17 LIBPATH="../../../liblttng-ust-java-agent/jni/jul/.libs"
849202d4 18else
501f6777 19 CLASSPATH="/usr/local/share/java/$JARFILE:/usr/share/java/$JARFILE"
5c0f2ea7
MJ
20 # Use system defined java.library.path
21 #LIBPATH="/usr/local/lib:/usr/lib"
849202d4
DG
22fi
23
eb2cc622
MJ
24if [ "x$LIBPATH" != "x" ]; then
25 JAVA_OPTIONS="$JAVA_OPTIONS -Djava.library.path=\"$LIBPATH\""
26fi
27
28java -classpath "$CLASSPATH:." $JAVA_OPTIONS Hello
849202d4
DG
29
30cd -
This page took 0.023432 seconds and 4 git commands to generate.