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

ASF subversion and git services commented on KNOX-3024:
-------------------------------------------------------

Commit 1e9a39b76b2da8d995f1201d9cf0ecf6b3d3d085 in knox's branch 
refs/heads/master from Sandor Molnar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=1e9a39b76 ]

KNOX-3024 - Fixed Java finding issues (#891)



> Fix findJava in knox-functions.sh
> ---------------------------------
>
>                 Key: KNOX-3024
>                 URL: https://issues.apache.org/jira/browse/KNOX-3024
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Release
>    Affects Versions: 1.4.0, 1.5.0, 2.0.0, 1.6.0, 1.6.1, 1.6.2
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Blocker
>             Fix For: 2.1.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 5 years ago, when I added {{shellcheck}} support to our build in the scope of 
> KNOX-1816, I introduced a bug in the {{findJava}} function in 
> {{{}knox-functions.sh{}}}: when $JAVA_HOME is not set, and Java is not 
> available on the path, the function tries to find java executables under 
> {{{}/usr{}}}. However, the current implementation is wrong:
> {noformat}
> $ which java
> /usr/bin/which: no java in 
> (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
> $ echo $JAVA_HOME
> $ bin/knoxcli.sh export-cert --type JKS
> Warning: JAVA is not set and could not be found.
> ...  {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to