Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
DIR=`dirname $0`
JARFILE="liblttng-ust-agent.jar"
+JAVA_OPTIONS=""
cd $DIR
#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 -
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
#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 -