Angelo Polo created CASSANDRA-14325:
---------------------------------------

             Summary: Java executable check succeeds despite no java on PATH
                 Key: CASSANDRA-14325
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14325
             Project: Cassandra
          Issue Type: Bug
          Components: Lifecycle
            Reporter: Angelo Polo
         Attachments: bin_cassandra.patch

The check -z $JAVA on line 102 of bin/cassandra currently always succeeds if 
JAVA_HOME is not set since in this case JAVA gets set directly to 'java'. The 
error message "_Unable to find java executable. Check JAVA_HOME and PATH 
environment variables._" will never be echoed on a PATH misconfiguration. If 
java isn't on the PATH the failure will instead occur on line 95 of 
cassandra-env.sh at the java version check.

It would be better to check consistently for the java executable in one place 
in bin/cassandra. Also we don't want users to mistakenly think they have a java 
version problem when they in fact have a PATH problem.

See proposed patch.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to