This is an automated email from the ASF dual-hosted git repository.
lhaiesp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git
The following commit(s) were added to refs/heads/master by this push:
new b9144ad SAMZA-2245: check jar path under java home
new 2809915 Merge pull request #1076 from lhaiesp/master
b9144ad is described below
commit b9144ad8f5973fdd825c957361e3d86162ed6cab
Author: Hai Lu <[email protected]>
AuthorDate: Sat Jun 8 16:21:52 2019 -0700
SAMZA-2245: check jar path under java home
---
samza-shell/src/main/bash/run-class.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/samza-shell/src/main/bash/run-class.sh
b/samza-shell/src/main/bash/run-class.sh
index e181121..cd50df3 100755
--- a/samza-shell/src/main/bash/run-class.sh
+++ b/samza-shell/src/main/bash/run-class.sh
@@ -81,7 +81,8 @@ else
echo generated from BASE_LIB_DIR CLASSPATH=$CLASSPATH
fi
-if [ -z "$JAVA_HOME" ]; then
+# In some cases (AWS) $JAVA_HOME/bin doesn't contain jar.
+if [ -z "$JAVA_HOME" ] || [ ! -e "$JAVA_HOME/bin/jar" ]; then
JAR="jar"
else
JAR="$JAVA_HOME/bin/jar"