How can I set the java version?

I would like to set the path to the needed version in hail configuration. Is this possible?

Thank you.

Java versions are usually controlled by a JAVA_HOME environment variable, not a configuration option inside hail initialization.

I need higher version for other applications. It would be nice to select the version while initializing hail.

Juerg

You should be able to set JAVA_HOME=/path/to/java/8 python hail_script.py

Hail should also work with JDK 11, if you have that installed.

I have latest on CentOS 7, which is openjdk-17 , and this gives an error with hail.

So you should separately download Java 8 or 11, then run the command @tpoterba said, where you set JAVA_HOME locally for just the running of python to point to that.