I cannot get the start.sh script to accept my Java installation

  • Platform information:
    • Hardware: Intel 64/Mac OS Catalina/16G/1TB
    • OS: Mac OS 10.15.6
    • Java Runtime Environment: 14.0.2
    • openHAB version: 2.5.8
  • Issue of the topic:

I have installed Zule JDK latest and it shows as installed from the command line (see below).

But OpenHAB reports Java 1.8 not found

martin@martinsmbp2016 openhab-2.5.8 % java -version
openjdk version “14.0.2” 2020-07-14
OpenJDK Runtime Environment Zulu14.29+23-CA (build 14.0.2+12)
OpenJDK 64-Bit Server VM Zulu14.29+23-CA (build 14.0.2+12, mixed mode, sharing)

martin@martinsmbp2016 openhab-2.5.8 % ./start.sh
Launching the openHAB runtime…
Unable to find any JVMs matching version “1.8”.
Error occurred while checking the system module.
martin@martinsmbp2016 openhab-2.5.8 %

OpenHAB requires Java 8. The upcoming openHAB 3 will require Java 11, bith long term supported releases.