Everything goes well until I check the java version with java -version then I get.
ubuntu@localhost:~$ java -version
-bash: /usr/bin/java: No such file or directory
Not sure what I did wrong. I have not even tried to install openhab2 yet.
JAVA_HOME should be set to the directory that contains bin/java (that is, that contains the bin directory, in which the java program is located). You might find it by
Sorry for being such a newbie. But learning minute by minute.
Here is what I see:
ubuntu@localhost:~$ sudo find / -name java -print
[sudo] password for ubuntu:
/var/lib/dpkg/alternatives/java
/opt/jdk/jdk1.8.0_111/bin/java
/opt/jdk/jdk1.8.0_111/jre/bin/java
/etc/alternatives/java
/usr/bin/java
ubuntu@localhost:~$