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

lizhimin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new aea4177655 [ISSUE #10171] Support custom JAVA_HOME on Linux in 
runbroker.sh and runserver.sh (#10172)
aea4177655 is described below

commit aea41776556ba49cfa11bb2d965e0036ab75d4d8
Author: majialong <[email protected]>
AuthorDate: Sat Mar 21 17:34:39 2026 +0800

    [ISSUE #10171] Support custom JAVA_HOME on Linux in runbroker.sh and 
runserver.sh (#10172)
---
 distribution/bin/runbroker.sh | 7 +++----
 distribution/bin/runserver.sh | 7 +++----
 distribution/bin/tools.sh     | 1 -
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/distribution/bin/runbroker.sh b/distribution/bin/runbroker.sh
index e701e6c320..5bb3872ef4 100644
--- a/distribution/bin/runbroker.sh
+++ b/distribution/bin/runbroker.sh
@@ -26,12 +26,11 @@ error_exit ()
 
 find_java_home()
 {
+    if [ -n "$JAVA_HOME" ]; then
+        return
+    fi
     case "`uname`" in
         Darwin)
-          if [ -n "$JAVA_HOME" ]; then
-            JAVA_HOME=$JAVA_HOME
-            return
-          fi
             JAVA_HOME=$(/usr/libexec/java_home)
         ;;
         *)
diff --git a/distribution/bin/runserver.sh b/distribution/bin/runserver.sh
index 2a5184d9f8..99f31eb5fd 100644
--- a/distribution/bin/runserver.sh
+++ b/distribution/bin/runserver.sh
@@ -26,12 +26,11 @@ error_exit ()
 
 find_java_home()
 {
+    if [ -n "$JAVA_HOME" ]; then
+        return
+    fi
     case "`uname`" in
         Darwin)
-          if [ -n "$JAVA_HOME" ]; then
-              JAVA_HOME=$JAVA_HOME
-              return
-          fi
             JAVA_HOME=$(/usr/libexec/java_home)
         ;;
         *)
diff --git a/distribution/bin/tools.sh b/distribution/bin/tools.sh
index 9b1e1d804d..96d7d1c7f9 100644
--- a/distribution/bin/tools.sh
+++ b/distribution/bin/tools.sh
@@ -27,7 +27,6 @@ error_exit ()
 find_java_home()
 {
     if [ -n "$JAVA_HOME" ]; then
-        JAVA_HOME=$JAVA_HOME
         return
     fi
     case "`uname`" in

Reply via email to