Openhab-cli console gets JAVA_HOME is not valid

You can set it in the config file. See Log4j2 Sample Config for a good example.