Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 1.7 or later is required to run Apache Drill

Tags:

apache-drill

When I type

$ drillbit.sh start

it shows me this error:

ERROR: Java 1.7 or later is required to run Apache Drill.

although I have the latest version of java

$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

also my $JAVA_HOME is set correctly in .profile

What could cause such issue?

like image 992
yakout Avatar asked Jan 30 '23 20:01

yakout


1 Answers

Well, after investgating a little bit I have found that the config file drill-config.sh checks the java version with bad regex:

"$JAVA" -version 2>&1 | grep "version" | egrep -e "1.4|1.5|1.6" > /dev/null
if [ $? -eq 0 ]; then
   fatal_error "Java 1.7 or later is required to run Apache Drill."
fi

The regex "1.4" matches 144 which is the update number in java version I have. So the floating point should be escaped to be "1\.4"

And this finally solved my problem.

like image 73
yakout Avatar answered Feb 15 '23 10:02

yakout