You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ti...@apache.org on 2023/03/20 02:54:11 UTC

[rocketmq] branch develop updated: [ISSUE #6026] Fix the problem that the custom JAVA_HOME environment variable does not take effect (#6167)

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

tigerlee 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 3f8cf890f [ISSUE #6026] Fix the problem that the custom JAVA_HOME environment variable does not take effect (#6167)
3f8cf890f is described below

commit 3f8cf890ffddb13dd7deeb031054ddb7abbac757
Author: Oliver <wq...@163.com>
AuthorDate: Mon Mar 20 10:54:00 2023 +0800

    [ISSUE #6026] Fix the problem that the custom JAVA_HOME environment variable does not take effect (#6167)
---
 distribution/bin/runbroker.sh | 4 ++++
 distribution/bin/runserver.sh | 4 ++++
 distribution/bin/tools.sh     | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/distribution/bin/runbroker.sh b/distribution/bin/runbroker.sh
index da1aa9f73..0b2a70ff6 100644
--- a/distribution/bin/runbroker.sh
+++ b/distribution/bin/runbroker.sh
@@ -28,6 +28,10 @@ find_java_home()
 {
     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 cdb31e40e..34104d472 100644
--- a/distribution/bin/runserver.sh
+++ b/distribution/bin/runserver.sh
@@ -28,6 +28,10 @@ find_java_home()
 {
     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 17207703a..bd3a4dd38 100644
--- a/distribution/bin/tools.sh
+++ b/distribution/bin/tools.sh
@@ -28,6 +28,10 @@ find_java_home()
 {
     case "`uname`" in
         Darwin)
+          if [ -n "$JAVA_HOME" ]; then
+              JAVA_HOME=$JAVA_HOME
+              return
+          fi
             JAVA_HOME=$(/usr/libexec/java_home)
         ;;
         *)