You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2013/09/30 17:06:19 UTC
git commit: Search Solaris-alternate path for Java binary
Updated Branches:
refs/heads/cassandra-2.0 b774eb14d -> 36ed511a6
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/cassandra-2.0
Commit: 36ed511a68a77b191e5389d9a53e97168ea33e48
Parents: b774eb1
Author: Eric Evans <ee...@apache.org>
Authored: Mon Sep 30 09:56:54 2013 -0500
Committer: Eric Evans <ee...@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