128725f1e2eda38bfbebcc83c89e770d7aa0a48e
[lttng-ust.git] / doc / examples / java-log4j / run
1 #!/bin/bash
2
3 #
4 # The -cp path should be changed to the lttng ust agent 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 Log4j library.
7 #
8
9 DIR=`dirname $0`
10 JARFILE="liblttng-ust-agent.jar"
11 LOG4J="/usr/local/share/java/log4j.jar:/usr/share/java/log4j.jar"
12
13 cd $DIR
14
15 if [ -f "$DIR/.intree" ]; then
16 CLASSPATH="../../../liblttng-ust-java-agent/java/$JARFILE:$LOG4J"
17 LIBPATH="../../../liblttng-ust-java-agent/jni/log4j/.libs"
18 else
19 CLASSPATH="/usr/local/share/java/$JARFILE:/usr/share/java/$JARFILE:$LOG4J"
20 LIBPATH="/usr/local/lib:/usr/lib"
21 fi
22
23 java -classpath "$CLASSPATH:." Hello
24
25 cd -
This page took 0.032934 seconds and 3 git commands to generate.