# OH2 on Windows 10?

**URL:** <https://community.openhab.org/t/oh2-on-windows-10/10620>\
**Category:** Runtime\
**Created:** [May 14, 2016, 2:22am UTC](https://community.openhab.org/t/oh2-on-windows-10/10620 "2016-05-14T02:22:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptmuldoon](https://community.openhab.org/user_avatar/community.openhab.org/ptmuldoon/32/36858_2.png) [@ptmuldoon](https://community.openhab.org/u/ptmuldoon)\
**Post date:** [May 14, 2016, 2:22am UTC](https://community.openhab.org/t/oh2-on-windows-10/10620/1 "2016-05-14T02:22:01Z")

</div>

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.

```auto
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>
```

---

<div class="post-metadata">

**Author:** ![sihui](https://community.openhab.org/user_avatar/community.openhab.org/sihui/32/55674_2.png) [@sihui](https://community.openhab.org/u/sihui)\
**Post date:** [May 14, 2016, 5:41am UTC](https://community.openhab.org/t/oh2-on-windows-10/10620/2 "2016-05-14T05:41:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kai](https://community.openhab.org/user_avatar/community.openhab.org/kai/32/116281_2.png) [@Kai](https://community.openhab.org/u/Kai)\
**Post date:** [May 14, 2016, 6:20am UTC](https://community.openhab.org/t/oh2-on-windows-10/10620/3 "2016-05-14T06:20:27Z")

</div>

I think all you need to do is to correctly set JAVA\_HOME, see [Starting OPENHAB 2 requires Registry Entries under Windows 10 · Issue #128 · openhab/openhab-distro · GitHub](https://github.com/openhab/openhab-distro/issues/128)

---

<div class="post-metadata">

**Author:** ![ptmuldoon](https://community.openhab.org/user_avatar/community.openhab.org/ptmuldoon/32/36858_2.png) [@ptmuldoon](https://community.openhab.org/u/ptmuldoon)\
**Post date:** [May 14, 2016, 3:20pm UTC](https://community.openhab.org/t/oh2-on-windows-10/10620/4 "2016-05-14T15:20:47Z")

</div>

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..

---

<div class="post-metadata">

**Author:** ![dinki](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/dec6dc/32.png) [@dinki](https://community.openhab.org/u/dinki)\
**Post date:** [June 21, 2016, 6:03pm UTC](https://community.openhab.org/t/oh2-on-windows-10/10620/5 "2016-06-21T18:03:03Z")

</div>

I am getting the same error. I tried setting the environment variable as described at [Setting the JAVA\_HOME Variable in Windows | Confluence Data Center 10.2 | Atlassian Documentation](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:

[![](https://i.imgur.com/szL80Jy.png) ](https://i.imgur.com/szL80Jy.png)

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.
