You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2019/03/15 06:50:00 UTC

[jira] [Commented] (ZOOKEEPER-3291) improve error message when JAVA_HOME is set to the wrong value

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

Hudson commented on ZOOKEEPER-3291:
-----------------------------------

SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #440 (See [https://builds.apache.org/job/ZooKeeper-trunk/440/])
ZOOKEEPER-3291: Improve error message when JAVA_HOME is set to the wrong (fangmin: rev 7256d01a26412cd35a46edab6de9ac8c5adf5bb3)
* (edit) bin/zkEnv.cmd


> improve error message when JAVA_HOME is set to the wrong value
> --------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3291
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3291
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 3.4.12
>         Environment: Windows
>            Reporter: Mogens Heller Grabe
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.6.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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.



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