Hardware:
Intel(R) Core™ i7-7700HQ CPU @ 2.80GHz x64//16.0 Gb RAM//Drive where openHAB installed 1 TB with 400 Gb free
OS:
Windows 10 Version 20H2 build 19042.1165
Java Runtime Environment:
Java version “17.0.11” 2024-04-16 LTS
Java™ SE Runtime Environment (build 17.0.11+7-LTS-207)
Java HotSpot™ 64-Bit Server VM (build 17.0.11+7-LTS-207, mixed mode, sharing)
openHAB version:
openhab-4.1.2
Issue of the topic:
After getting the JAVA_HOME environental variable set up and making sure I have the correct JDK version installed (first time through received an error as had JDK 22 installed and only runs up to 17 according to the error I got at the time). Regardless, installed correct JDK, set up JAVA_HOME and have re-ran start.bat and I get “17 was expected at this time”?? (pasted below from CMD window)
"
start.bat
Launching the openHAB runtime…
LOCALAPPDATA=C:\Users\murff\AppData\Local
17 was unexpected at this time.
"
First time installing openHAB (or similar software), but trying to get myself a upgrade/more customizable/locally run home automation setup. Given that I’m new to openHAB, I’m completely lost with what to try… any help would be greatly appreciated!!
Hi,
Welcome to the community.
Make sure when you installed java you allowed it to update your java install location correctly for the path location in the system variable area. As well as setting JAVA_HOME
Also make sure you installed the JDK and not just the JRE runtime…
Assuming you are following the documentation very closely here.
EDIT:
Couple things you can do is from an elevated command line enter the following to confirm you are fully configured and pointing to correct install of java.
java --version
path
echo %JAVA_HOME%
type each one and press enter then confirm you get expected values for your configuration.
Review the documentation link for installing on windows and if OpenHab version 4.x.x You will need Java JDK version of 17 a higher version may work but are not the currently recommended version.
You must configure JAVA_HOME to point to that JAVA version not to older versions.
You must update Path to include the JAVA 17 JDK version and you must configure JAVA_HOME to point to the bin of that version
As below link describes.
In the screen shot contained in the link it is reflecting ZULU JDK version 11 of Java 11 as that was what older version of Openhab required.
However for OpenHab versions 4.x.x and up 17 is lowest JDK version needed
The Zulu 17 JDK package will auto configure those settings.
Also, once you have completed the install you should consider restarting windows so it updates the system variables correctly.
when you have it configured correctly you should get something like this