projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: running java examples out of tree
[lttng-ust.git]
/
doc
/
examples
/
java-log4j
/
run
diff --git
a/doc/examples/java-log4j/run
b/doc/examples/java-log4j/run
index 9dca6087690d15bff9bd6b149a2f978762d726e0..91f8f5d6b74300996b999f216e31fb2f2c935077 100755
(executable)
--- a/
doc/examples/java-log4j/run
+++ b/
doc/examples/java-log4j/run
@@
-8,6
+8,7
@@
DIR=`dirname $0`
JARFILE="liblttng-ust-agent.jar"
DIR=`dirname $0`
JARFILE="liblttng-ust-agent.jar"
+JAVA_OPTIONS=""
# If system classpath is empty, try to guess log4j location
if [ "x$CLASSPATH" = "x" ]; then
# If system classpath is empty, try to guess log4j location
if [ "x$CLASSPATH" = "x" ]; then
@@
-25,6
+26,10
@@
else
#LIBPATH="/usr/local/lib:/usr/lib"
fi
#LIBPATH="/usr/local/lib:/usr/lib"
fi
-java -classpath "$CLASSPATH:." -Djava.library.path="$LIBPATH" Hello
+if [ "x$LIBPATH" != "x" ]; then
+ JAVA_OPTIONS="$JAVA_OPTIONS -Djava.library.path=\"$LIBPATH\""
+fi
+
+java -classpath "$CLASSPATH:." $JAVA_OPTIONS Hello
cd -
cd -
This page took
0.023458 seconds
and
4
git commands to generate.