OH2 on Windows 10?

Was going to do some testing and experimenting tonight and thought to run the latest OH2 build on a Win10 Machine here, but getting the below error when running the start file.

The strange part is that I do have Java Installed on this laptop, so no idea what could be causing the error. The machine has Version 8, update 91 on it.

Yet I get this error? And also get same error if trying to run the start_debug as well.

C:\Users\Paul.Muldoon\Desktop\OpenHab2>start.bat
Launching the openHAB runtime...
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
Unable to retrieve JAVA_HOME from Registry
JAVA_HOME is not valid: ""
The system cannot find the batch label specified - END
karaf.bat: JAVA_HOME not set; results may vary
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
karaf.bat: Unable to retrieve JAVA_HOME from Registry
karaf.bat: JAVA_HOME is not valid: ""
C:\Users\Paul.Muldoon\Desktop\OpenHab2>

Same error message here with #296 on Win10 64-bit and Java 32-bit … :joy:

I think all you need to do is to correctly set JAVA_HOME, see https://github.com/openhab/openhab-distro/issues/128

1 Like

After doing a little research on how to set JAVA_HOME on a Win10 Machine, I also learned that this machine/laptop had a 32 bit install of Java installed on Win10 64 bit machine.

I removed the 32 bit version. Rebooted and installed the Java 64 bit (offline) version. Then OH2 started right up.

I probably could have fixed/add the environment variable to point to the 32 bit location, but though better to have the correct 64 bit version installed for the OS…

I am getting the same error. I tried setting the environment variable as described at https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html but it still does not find it. Here’s what my enironment variable looks like:

I open a new command prompt and try an ‘echo %JAVA_HOME%’ and it just echos that text rather than the path I’m trying to set. Anyone know what I’m doing wrong?

EDIT Reboot was necessary to get the setting to stick. Works now.