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 <zhaijia@apache.org>, Anup Ghatage <None>, Nicolò Boschi <boschi1997@gmail.com>

This closes #2436 from eolivelli/fix/support-jdk11-jre
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 @@
 
 detect_jdk8() {
 
-  if [ -f "$JAVA_HOME/bin/jshell" ]; then
+  if [ -f "$JAVA_HOME/lib/modules" ]; then
      echo "0"
   else
      echo "1"