Cannot find java.exe, yet have a java stack trace

I am trying to get the initial OpenHAB install running. I d/l the latest stable release along with the addons (ver 3.2.0).

The machine is running Win7 64bit. It is NOT connected to the Internet but is on a separate LAN. I connect to it via Remote Desktop (through a firewall).

I unzipped the file into C:\OpenHab, then copied in the addon file.

I then tried to run start.bat from a command line. I get a new command window, but no further action. If I open the file manager, then double click on start.bat, I get a new window, plus it continues. Weird…

This is the Java version.

C:\OpenHAB>java -version
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)

start.bat result

Launching the openHAB runtime...
find: '/I': No such file or directory
find: '/N': No such file or directory
find: 'java.exe': No such file or directory

                           _   _     _     ____
   ___   ___   ___   ___  | | | |   / \   | __ )
  / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \
 | (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )
  \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/
       |_|       3.2.0 - Release Build

Use '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
To exit, use '<ctrl-d>' or 'logout'.

org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missin
g requirement [root] osgi.identity; osgi.identity=openhab-runtime-base; type=kar
af.feature; version="[3.2.0,3.2.0]"; filter:="(&(osgi.identity=openhab-runtime-b
ase)(type=karaf.feature)(version>=3.2.0)(version<=3.2.0))" [caused by: Unable to
 resolve openhab-runtime-base/3.2.0: missing requirement [openhab-runtime-base/3
.2.0] osgi.identity; osgi.identity=openhab-core-model-sitemap; type=karaf.featur
e [caused by: Unable to resolve openhab-core-model-sitemap/3.2.0: missing requir
ement [openhab-core-model-sitemap/3.2.0] osgi.identity; osgi.identity=org.openha
b.core.model.sitemap; type=osgi.bundle; version="[3.2.0,3.2.0]"; resolution:=man
datory [caused by: Unable to resolve org.openhab.core.model.sitemap/3.2.0: missi
ng requirement [org.openhab.core.model.sitemap/3.2.0] osgi.wiring.package; filte
r:="(&(osgi.wiring.package=org.openhab.core.items.dto)(version>=3.2.0)(!(version
>=4.0.0)))" [caused by: Unable to resolve org.openhab.core/3.2.0: missing requir
ement [org.openhab.core/3.2.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))
"]]]]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toExcept
ion(Candidates.java:1341)
        at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:43
3)
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420)

        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374)

        at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(S
ubsystemResolver.java:257)
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.j
ava:399)
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProv
ision(FeaturesServiceImpl.java:1069)
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda
$doProvisionInThread$13(FeaturesServiceImpl.java:1004)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve o
penhab-runtime-base/3.2.0: missing requirement [openhab-runtime-base/3.2.0] osgi
.identity; osgi.identity=openhab-core-model-sitemap; type=karaf.feature [caused
by: Unable to resolve openhab-core-model-sitemap/3.2.0: missing requirement [ope
nhab-core-model-sitemap/3.2.0] osgi.identity; osgi.identity=org.openhab.core.mod
el.sitemap; type=osgi.bundle; version="[3.2.0,3.2.0]"; resolution:=mandatory [ca
used by: Unable to resolve org.openhab.core.model.sitemap/3.2.0: missing require
ment [org.openhab.core.model.sitemap/3.2.0] osgi.wiring.package; filter:="(&(osg
i.wiring.package=org.openhab.core.items.dto)(version>=3.2.0)(!(version>=4.0.0)))
" [caused by: Unable to resolve org.openhab.core/3.2.0: missing requirement [org
.openhab.core/3.2.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]]]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toExcept
ion(Candidates.java:1341)
        ... 12 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve o
penhab-core-model-sitemap/3.2.0: missing requirement [openhab-core-model-sitemap
/3.2.0] osgi.identity; osgi.identity=org.openhab.core.model.sitemap; type=osgi.b
undle; version="[3.2.0,3.2.0]"; resolution:=mandatory [caused by: Unable to reso
lve org.openhab.core.model.sitemap/3.2.0: missing requirement [org.openhab.core.
model.sitemap/3.2.0] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.op
enhab.core.items.dto)(version>=3.2.0)(!(version>=4.0.0)))" [caused by: Unable to
 resolve org.openhab.core/3.2.0: missing requirement [org.openhab.core/3.2.0] os
gi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"]]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toExcept
ion(Candidates.java:1341)
        ... 13 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve o
rg.openhab.core.model.sitemap/3.2.0: missing requirement [org.openhab.core.model
.sitemap/3.2.0] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab
.core.items.dto)(version>=3.2.0)(!(version>=4.0.0)))" [caused by: Unable to reso
lve org.openhab.core/3.2.0: missing requirement [org.openhab.core/3.2.0] osgi.ee
; filter:="(&(osgi.ee=JavaSE)(version=11))"]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toExcept
ion(Candidates.java:1341)
        ... 14 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve o
rg.openhab.core/3.2.0: missing requirement [org.openhab.core/3.2.0] osgi.ee; fil
ter:="(&(osgi.ee=JavaSE)(version=11))"
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toExcept
ion(Candidates.java:1341)
        ... 15 more
openhab>

So I do end up with an OpenHAB prompt, however…

The only thing I did out of sequence, is the first time I ran start.bat I got a warning about running regedit. I cancelled the request. I then read into the batch file sequence and saw you were only reading the registry, so I then allowed it to continue. The installation instructions really do need to warn a user that the registry is being touched.

Anyway, any suggestions?

First make sure that you use the recommended java version which is java 11 instead of java 8 ( 1.8 ).

Hmmm, I am using an Eclipse mod called “Sloeber” for arduino development (many sensors in the house). It has issues with the latest Java versions and needs Java 8.

I am uncertain how having two different Java installations on the machine would work.

OH3 only works with Java 11.
You can install an additional version. You need to make sure that the software that you run uses JAVA_HOME and realated PATH environment variable to find the binaries.

Ok, I did that. I also modified start.bat by adding a set command for JAVA_HOME, and getting the version number.

Java setup -----------------
C:\OpenHAB>set JAVA_HOME=C:\OpenHAB\java

C:\OpenHAB>java\bin\java -version
openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu17.30+15-CA (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM Zulu17.30+15-CA (build 17.0.1+12-LTS, mixed mode, sharing)
Java setup -----------------

Launching the openHAB runtime...
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.eclipse.osgi.internal.framework.SystemBundleActivator (file:/C:/OpenHAB/runtime/system/org/
eclipse/platform/org.eclipse.osgi/3.16.300/org.eclipse.osgi-3.16.300.jar)
WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.internal.framework.SystemBundleActivator
WARNING: System::setSecurityManager will be removed in a future release

                           _   _     _     ____
   ___   ___   ___   ___  | | | |   / \   | __ )
  / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \
 | (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )
  \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/
       |_|       3.2.0 - Release Build

Use '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
To exit, use '<ctrl-d>' or 'logout'.

openhab>

When I first ran this after the java install, I got the openhab prompt, then after a few minutes I got a stack trace, and every few minutes after that I got another stack trace.

However after repeated runs of start.bat and it seems stable in spite of the warnings. However I only have the command line right now.

I cannot get the web page to load. I can see the source, but it does not display. I am using IE version 8. I could not find a browser recommendation in the documentation.

I can get Chrome (version 97.0.4692.71) as a download (rather than an Internet install, 123Mbytes!) which should work?

I installed Chrome and now have access.

Thanks

You might expect some problems

1 Like

Ok, but I d/l the Java version from the supplied link in the instructions:

Install a recent Java 11 platform (we recommend the Zulu builds of OpenJDK)

Ok, removed 17 and installed 11, no errors

Thanks

Ok, if on the command line you enter “start”, then a new window is opened. This is due to the order of operations in the Windows world. Internal commands are run before batch files are run.

You MUST type in “start.bat” (with the .bat extension) to actually run start.bat, otherwise the start command takes precedence and opens a new command line window

1 Like