You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by ch...@apache.org on 2023/03/27 11:08:28 UTC
[incubator-celeborn] branch branch-0.2 updated: [CELEBORN-481] Fix empty JAVA_VERSION (#1389)
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-0.2
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/branch-0.2 by this push:
new fa3655c55 [CELEBORN-481] Fix empty JAVA_VERSION (#1389)
fa3655c55 is described below
commit fa3655c55614a933aea12f721f8296ea7b318832
Author: Keyong Zhou <zh...@apache.org>
AuthorDate: Mon Mar 27 19:08:22 2023 +0800
[CELEBORN-481] Fix empty JAVA_VERSION (#1389)
* [CELEBORN-481] Fix empty JAVA_VERSION
* add blank line
---
sbin/celeborn-config.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sbin/celeborn-config.sh b/sbin/celeborn-config.sh
index a9ecd4f16..2fac6e9b4 100755
--- a/sbin/celeborn-config.sh
+++ b/sbin/celeborn-config.sh
@@ -39,3 +39,15 @@ if [ -z "$CELEBORN_ENV_LOADED" ]; then
set +a
fi
fi
+
+# Find the java binary
+if [ -n "${JAVA_HOME}" ]; then
+ export JAVA="${JAVA_HOME}/bin/java"
+else
+ if [ "$(command -v java)" ]; then
+ export JAVA="java"
+ else
+ echo "JAVA_HOME is not set" >&2
+ exit 1
+ fi
+fi