Java version incompatibility

Hi
I am atte,ting to run my first query to test the installation. I am using a linux mint. on the prompt of python3 after import hail, I have the response, I can understand the output, please can you help me

hail.init()
2020-07-12 18:45:26 WARN Utils:66 - Your hostname, luis-home resolves to a loopback address: 127.0.1.1; using 192.168.0.6 instead (on interface wlp3s0)
2020-07-12 18:45:26 WARN Utils:66 - Set SPARK_LOCAL_IP if you need to bind to another address
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.spark.unsafe.Platform (file:/home/luis/.local/lib/python3.6/site-packages/pyspark/jars/spark-unsafe_2.11-2.4.1.jar) to method java.nio.Bits.unaligned()
WARNING: Please consider reporting this to the maintainers of org.apache.spark.unsafe.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2020-07-12 18:45:26 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform… using builtin-java classes where applicable
Setting default log level to “WARN”.
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
2020-07-12 18:45:27 WARN Hail:37 - This Hail JAR was compiled for Spark 2.4.5, running with Spark 2.4.1.
Compatibility is not guaranteed.
Traceback (most recent call last):
File “”, line 1, in
File “”, line 2, in init
File “/home/luis/.local/lib/python3.6/site-packages/hail/typecheck/check.py”, line 614, in wrapper
return original_func(*args, **kwargs)
File “/home/luis/.local/lib/python3.6/site-packages/hail/context.py”, line 228, in init
skip_logging_configuration, optimizer_iterations)
File “/home/luis/.local/lib/python3.6/site-packages/hail/backend/spark_backend.py”, line 195, in init
self._jbackend, log, True, append, branching_factor, skip_logging_configuration, optimizer_iterations)
File “/home/luis/.local/lib/python3.6/site-packages/py4j/java_gateway.py”, line 1257, in call
answer, self.gateway_client, self.target_id, self.name)
File “/home/luis/.local/lib/python3.6/site-packages/py4j/protocol.py”, line 328, in get_return_value
format(target_id, “.”, name), value)
py4j.protocol.Py4JJavaError: An error occurred while calling z:is.hail.HailContext.apply.
: is.hail.utils.HailException: Hail requires Java 8, found 11.0.7
at is.hail.utils.ErrorHandling$class.fatal(ErrorHandling.scala:9)
at is.hail.utils.package$.fatal(package.scala:77)
at is.hail.HailContext$.checkJavaVersion(HailContext.scala:93)
at is.hail.HailContext$.apply(HailContext.scala:129)
at is.hail.HailContext.apply(HailContext.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:282)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.base/java.lang.Thread.run(Thread.java:834)

Hi @ldiambra,

I’m sorry you’re having trouble with Hail. The issue is buried a little bit, but the root cause is here:

You have to install Java 8 and ensure it is the default Java version. You might need to investigate update-alternatives

Thank you very much, I installed java version 8 but it was not as default. Now I am resolved with
sudo update-alternatives --config java