Installed on a Windows 7, x64, installed JDK 1.8 (and command prompt confirms java 1.8 with “java -version”)
Using latest snapshot of openhab-2.0.0
when starting in debug mode, I get the following error:
Launching the openHAB runtime…
Unrecognized VM option '+UseG1GC’
Could not create the Java virtual machine.
OK, so the JVM appears to be correct and it does accept the option.
I’m wondering if openHAB is starting using a different JVM.
Can you try adding the same command in the start.bat and then start openHAB.
You should see exactly the same output appear…
I pasted the command before the @echo off so we can see the commande being executed.
C:\openhab-2>start.bat
C:\openhab-2>java -XX:+UseG1GC -version
java version "1.8.0_73"
Java™ SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot™ 64-Bit Server VM (build 25.73-b02, mixed mode)
Launching the openHAB runtime…
Unrecognized VM option '+UseG1GC’
Could not create the Java virtual machine.
While looking in the karaf.bat file, there’s a setting looking for a JAVA_HOME env. variable… I had one set to a old JDK 1.5… (for another project). I changed it and openhab started like a charms.
On a side note, should’t there be a check, if a JAVA_HOME is set, look and see if the java bin in there is also to a latest version capable of running openhab ? - just a tought
We specifically had introduced such checks, see here and here. @davy Are we checking the version against the java on the path and not the one defined in JAVA_HOME?