Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14325

Java executable check succeeds despite no java on PATH

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Low
    • Resolution: Unresolved
    • Fix Version/s: None
    • Labels:
      None
    • Severity:
      Low

      Description

      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.

        Attachments

        1. bin_cassandra.patch
          0.3 kB
          Angelo Polo

          Activity

            People

            • Assignee:
              polo-language Angelo Polo
              Reporter:
              polo-language Angelo Polo
              Authors:
              Angelo Polo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: