You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Shuler (JIRA)" <ji...@apache.org> on 2014/08/08 19:01:14 UTC

[jira] [Commented] (CASSANDRA-7676) bin/cassandra should complain if $JAVA is empty or not an executable

    [ https://issues.apache.org/jira/browse/CASSANDRA-7676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090965#comment-14090965 ] 

Michael Shuler commented on CASSANDRA-7676:
-------------------------------------------

Works for me, but is the second check reachable?

{noformat}
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ export JAVA_HOME=/dev/null
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ cassandra
Unable to find java executable. Check JAVA_HOME and PATH environment variables.
{noformat}

I tried to reach the second conditional, but only hit the first, then the version check
{noformat}
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ mkdir -p /tmp/myjdk/bin
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ touch /tmp/myjdk/bin/java
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ export JAVA_HOME=/tmp/myjdk
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ cassandra
Unable to find java executable. Check JAVA_HOME and PATH environment variables.
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ chmod 755 /tmp/myjdk/bin/java 
(cassandra-2.0 *)mshuler@hana:~/git/cassandra$ cassandra
Cassandra 2.0 and later require Java 7 or later.
{noformat}

> bin/cassandra should complain if $JAVA is empty or not an executable
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-7676
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7676
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Trivial
>         Attachments: java_not_found-fix.txt
>
>
> If JAVA_HOME points to a non-existing directory, bin/cassandra just complains with {{[node1 ERROR] /Users/snazy/.ccm/test/node1/bin/cassandra: line 151: exec: : not found}} (via ccm).
> Patch checks if {{$JAVA}} is empty or does not point to an executable and prints appropriate error message.
> (Patch against trunk)



--
This message was sent by Atlassian JIRA
(v6.2#6252)