Problem launching Openhab in Windows

I had to reinstall my Windows 10 and now I am unable to launch Openhab (versions 1.6.2 and 1.7.1). I get the following message:

The system cannot find the path specified.
Launching the openhab runtime…
Unrecognized option: -console
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I have Java Version 8 update 66 installed. I also installed Java JRE 8 and JDK 8 on my 64bit machine.

What could be the problem? My old Openhab 1.6.2 was working fine before the Windows reinstall…

Not run as administrador, only double click

that is what I am doing, I am double clicking on start.bat. Alternatively I am launching start.bat from a shell console.

Try installing the 32Bit version of Java.

I uninstalled my 64bit versions of Java and installed 32bit Java JRE 1.8.0.66 but have exactly the same error after launching the start.bat.

Do I need JDK as well?

Tried with JDK 1.8.0_65 32bit in addition to JRE 32bit and have the same results.

The system cannot find the path specified.
Launching the openhab runtime…
Unrecognized option: -console
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Please help, as my house without Openhab is half the fun…

The only Java version I have installed is https://www.java.com/en/download/ as 32 and 64 Bit version.
It should be no problem to have 32 and 64 Bit versions installed both at the same time.
But for OH Designer you definitely need at least the 32 Bit version, so I assume this is also true for OH Runtime.
As of my knowledge you don’t need any other of your mentioned java versions. Those are only needed when you run OH on Linux based systems.

Good luck.

Thanks sihui. I tried after reinstalling the 64bit version of Java in addition to the 32bit version; it did not work. I also removed the JDK, it still does not work. I am running out of ideas…

Hmmm, me too, sorry :joy:

OK I finally found the problem. It was described inside an old thread in the old forum:

Help for newbie with quick setup of openhab

The problem was caused by the fact that the runtime folder was inside a directory where one folder contained a space in the folder name! That one directory is the ‘My Documents’ folder, which, to make things worse, Windows displays as ‘Documents’ most of the time (only when you click on the folder directory navigation space it reveals ‘Documents’ as ‘My Documents’…).

So Windows users remember to not put the runtime folder into a folder structure containing a space…!

1 Like

I am having a similar issue. I am following the guide:

If you have downloaded the openHAB distribution zip file, simply unzip it to a local folder and call ‘start.sh’ (resp. ‘start.bat’) from the command line. The distribution is preconfigured to install demo files, so that you directly have a working instance that you can start playing with.

Once the runtime is started, you can access it in your browser at ‘http://localhost:8080/’ (note that it might take a bit for the HTTP server to be started, even if the console already welcomes you):

when I run start.sh or start.bat the cmd window opens and closes quickly. running start.bat shows:

C:\Users\daveh>C:\Users\daveh\Desktop\openhab2\distributions\distribution-resources\src\main\resources\home\start.bat
Launching the openHAB runtime…
The system cannot find the path specified.

btw openhab 1.7 works fine on my machine