This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch branch-4.11
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/branch-4.11 by this push:
     new 901a207  Detect Java 11 JRE and not only JDK
901a207 is described below

commit 901a20762f8403e568fe658a729b279238ed1376
Author: Enrico Olivelli <[email protected]>
AuthorDate: Fri Oct 16 17:15:52 2020 +0200

    Detect Java 11 JRE and not only JDK
    
    - Use 'lib/modules' in order to detect a modern JDK
    - With this change we can detect both JDK and JRE
    
    Reviewers: Jia Zhai <[email protected]>, Anup Ghatage <None>, Nicolò 
Boschi <[email protected]>
    
    This closes #2436 from eolivelli/fix/support-jdk11-jre
    
    (cherry picked from commit b95c753a87a97114012e0af2b11972c3df01d48d)
    Signed-off-by: Enrico Olivelli <[email protected]>
---
 bin/common.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/common.sh b/bin/common.sh
index 66122b8..c287535 100755
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -72,7 +72,7 @@ source ${BK_CONFDIR}/bk_cli_env.sh
 
 detect_jdk8() {
 
-  if [ -f "$JAVA_HOME/bin/jshell" ]; then
+  if [ -f "$JAVA_HOME/lib/modules" ]; then
      echo "0"
   else
      echo "1"

Reply via email to