| 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` |
| 10 | JARFILE="liblttng-ust-agent.jar" |
| 11 | |
| 12 | cd $DIR |
| 13 | |
| 14 | if [ -f "$DIR/.intree" ]; then |
| 15 | CLASSPATH="../../../liblttng-ust-java-agent/java/$JARFILE" |
| 16 | LIBPATH="../../../liblttng-ust-java-agent/jni/jul/.libs" |
| 17 | else |
| 18 | CLASSPATH="/usr/local/share/java/$JARFILE:/usr/share/java/$JARFILE" |
| 19 | LIBPATH="/usr/local/lib:/usr/lib" |
| 20 | fi |
| 21 | |
| 22 | java -cp "$CLASSPATH:." -Djava.library.path="$LIBPATH" Hello |
| 23 | |
| 24 | cd - |