CB-7634 Detect JAVA_HOME properly on Ubuntu