how to check if java_home is set code example
Example: find where JAVA_HOME is set
grep JAVA_HOME /etc/environment /etc/bash.bashrc /etc/profile.d/* /etc/profile
grep JAVA_HOME /etc/environment /etc/bash.bashrc /etc/profile.d/* /etc/profile