How many times it has happen, that you came across some TUI setup and you have been asked to give the path to JAVA HOME. For me, numerous times.
JAVA HOME basically asks you to give the home directory off JAVA binary. But in the world of linux, whenever Java (JDK/SDK/JRE) is updated it never deletes the previous version of JAVA but adds the new version of it, so the backward compatible software could run nice and crisp using older JAVA binaries.
This is where I thought of sharing my thought on how to get the location of latest JAVA HOME directory.
Fire up a terminal and do
$ which java (This will return the path of the current java binary. Over here its /usr/bin/java)
$ ls -alh /usr/bin/java ( This will return true path to the symbolic link. Over here its /etc/alternatives/java.
$ls -alh /etc/alternatives/java ( This will return true path to this symbolic link which is actual JAVA HOME path)
Now you may set up the path for it as mentioned over this post Set JAVA HOME path