Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3291

improve error message when JAVA_HOME is set to the wrong value

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.4.12
    • 3.6.0
    • scripts
    • Windows

    Description

      This is small (Windows-based) developer usability improvement.

      When the JAVA_HOME environment variable is set, but the value is wrong (so that JAVA_HOME + /bin/java.exe does not point correctly to java.exe), the startup script will simply fail with the message

      Error: JAVA_HOME is incorrectly set.

      which is a bummer. 😞

      With this tiny change, the error message will be much friendlier:

      Error: JAVA_HOME is incorrectly set: C:\Program Files\Java\jre1.8.0_201\bin
      Expected to find java.exe here: C:\Program Files\Java\jre1.8.0_201\bin\bin\java.exe

      (in this case showing a situation where one has inadvertently included /bin in the JAVA_HOME environment variable).

      This will also give a nicer error message in situations, where the JRE has been updated, and the one pointed to by JAVA_HOME has been uninstalled.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mookid8000 Mogens Heller Grabe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m