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

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


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

commit b95c753a87a97114012e0af2b11972c3df01d48d
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
---
 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