Wrong JDK found after running start.sh

Hi!

I was calling start.sh to get openHAB-2 running on Ubuntu and my shell gave me the answer:
Launching the openHAB runtime…
./runtime/karaf/bin/karaf: 159: ./runtime/karaf/bin/setenv: die: not found
./runtime/karaf/bin/karaf: 179: [: Illegal number:
./runtime/karaf/bin/karaf: 239: [: Illegal number:
./runtime/karaf/bin/karaf: 284: [: Illegal number:
./runtime/karaf/bin/karaf: 437: ./runtime/karaf/bin/karaf: /usr/local/tools/java/jdk1.7.0_79.jdk/bin/java: not found

That’s strange, because I already installed Oracle JDK 1.8 right before and configured it. If I type ‘java -version’ into the terminal I will get the answer:
java version "1.8.0_91"
Java™ SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot™ 64-Bit Server VM (build 25.91-b14, mixed mode)

For me it seems that my terminal knows where to look for the correct JDK, but openhab-starting-procedure got triggered in the wrong direction. This is the first time this problem occurs. I installed openHAB-2 on Windows, Linux and OSX-boxes and never expierenced this issue.

Where do I need to look for editing the configuration to openHAB-2 running?

Thanks in advance.

Jochen

I would look at start.sh and see what path it is using to get to java. Do they just depend on your PATH environment variable or do they use one of the soft links like /etc/alternatives/java which might point to the wrong one.

did you

cd <openhab-runtime-folder>
./start.sh

?
start.sh does only work correct this way.