cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/6] git commit: Search Solaris-alternate path for Java binary
Date Mon, 30 Sep 2013 18:01:36 GMT
Updated Branches:
  refs/heads/cassandra-2.0 ea05f5baf -> 00f6173f5
  refs/heads/trunk 359d566e8 -> a36436fc3


Search Solaris-alternate path for Java binary

Patch by eevans for CASSANDRA-4638


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36ed511a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36ed511a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36ed511a

Branch: refs/heads/trunk
Commit: 36ed511a68a77b191e5389d9a53e97168ea33e48
Parents: b774eb1
Author: Eric Evans <eevans@apache.org>
Authored: Mon Sep 30 09:56:54 2013 -0500
Committer: Eric Evans <eevans@apache.org>
Committed: Mon Sep 30 09:56:54 2013 -0500

----------------------------------------------------------------------
 bin/cassandra | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/36ed511a/bin/cassandra
----------------------------------------------------------------------
diff --git a/bin/cassandra b/bin/cassandra
index e41385e..c4c2ec2 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -84,7 +84,16 @@ fi
 
 # Use JAVA_HOME if set, otherwise look for java in PATH
 if [ -n "$JAVA_HOME" ]; then
-    JAVA="$JAVA_HOME/bin/java"
+    # Why we can't have nice things: Solaris combines x86 and x86_64
+    # installations in the same tree, using an unconventional path for the
+    # 64bit JVM.  Since we prefer 64bit, search the alternate path first,
+    # (see https://issues.apache.org/jira/browse/CASSANDRA-4638).
+    for java in "$JAVA_HOME"/bin/amd64/java "$JAVA_HOME"/bin/java; do
+        if [ -x "$java" ]; then
+            JAVA="$java"
+            break
+        fi
+    done
 else
     JAVA=java
 fi


Mime
View raw message