This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 3b58950b520680b0d799901d8b6650e34db0d442
Author: xyf <[email protected]>
AuthorDate: Thu Sep 21 08:10:36 2023 +0800

    [chore](thirdparty)We need to issue an error when starting FE without 
setting the Java home environment (#23943)
    
    
    
    ---------
    
    Co-authored-by: yiguolei <[email protected]>
---
 bin/start_fe.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/start_fe.sh b/bin/start_fe.sh
index 087f2712e0..9caf6564e6 100755
--- a/bin/start_fe.sh
+++ b/bin/start_fe.sh
@@ -119,8 +119,14 @@ if [[ -e "${DORIS_HOME}/bin/palo_env.sh" ]]; then
     source "${DORIS_HOME}/bin/palo_env.sh"
 fi
 
+#Due to the machine not being configured with Java home, in this case, when FE 
cannot start, it is necessary to prompt an error message indicating that it has 
not yet been configured with Java home.
+
 if [[ -z "${JAVA_HOME}" ]]; then
-    JAVA="$(command -v java)"
+    if ! command -v java &>/dev/null; then
+        JAVA=""
+    else
+        JAVA="$(command -v java)"
+    fi
 else
     JAVA="${JAVA_HOME}/bin/java"
 fi


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to