check if java is installed code example
Example 1: check if jquery is installed
if (typeof jQuery == "undefined") {
alert("JQuery is not installed");
} else {
alert("JQuery is installed correctly!");
}
Example 2: linux command to see all the java version installed
sudo update-alternatives --display java