Commit | Line | Data |
---|---|---|
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 | ||
9 | DIR=`dirname $0` | |
501f6777 | 10 | JARFILE="liblttng-ust-agent.jar" |
cd9116e5 | 11 | JAVA_OPTIONS="" |
849202d4 DG |
12 | |
13 | cd $DIR | |
14 | ||
15 | if [ -f "$DIR/.intree" ]; then | |
501f6777 CB |
16 | CLASSPATH="../../../liblttng-ust-java-agent/java/$JARFILE" |
17 | LIBPATH="../../../liblttng-ust-java-agent/jni/jul/.libs" | |
849202d4 | 18 | else |
501f6777 | 19 | CLASSPATH="/usr/local/share/java/$JARFILE:/usr/share/java/$JARFILE" |
be347eb9 MJ |
20 | # Use system defined java.library.path |
21 | #LIBPATH="/usr/local/lib:/usr/lib" | |
849202d4 DG |
22 | fi |
23 | ||
cd9116e5 | 24 | if [ "x$LIBPATH" != "x" ]; then |
1291d767 | 25 | JAVA_OPTIONS="$JAVA_OPTIONS -Djava.library.path=$LIBPATH" |
cd9116e5 MJ |
26 | fi |
27 | ||
28 | java -classpath "$CLASSPATH:." $JAVA_OPTIONS Hello | |
849202d4 DG |
29 | |
30 | cd - |