You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ekaterina Dimitrova (Jira)" <ji...@apache.org> on 2021/07/15 15:54:00 UTC
[jira] [Comment Edited] (CASSANDRA-14325) Java executable check
succeeds despite no java on PATH
[ https://issues.apache.org/jira/browse/CASSANDRA-14325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381431#comment-17381431 ]
Ekaterina Dimitrova edited comment on CASSANDRA-14325 at 7/15/21, 3:53 PM:
---------------------------------------------------------------------------
+1, thank you. I am also adding [~azotcsit] as a reviewer as he also did a pass and gave valuable feedback.
was (Author: e.dimitrova):
+1, thank you. I am also adding [~azotcsit] as a reviewer as he also did a pass.
> 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: Local/Startup and Shutdown
> Reporter: Angelo Polo
> Assignee: Angelo Polo
> Priority: Low
> Fix For: 3.0.x, 3.11.x, 4.0.x
>
> Attachments: bin_cassandra.in.sh.patch, redhat_cassandra.in.sh.patch, tools_bin_cassandra.in.sh.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
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org