find java home in linux
This post is only for my use. I have copied this content from stackoverflow
Any of the below command will give the java home in Linux
java -XshowSettings:properties -version 2>&1 > /dev/null | grep ‘java.home’
jrunscript -e ‘java.lang.System.out.println(java.lang.System.getProperty(“java.home”))’;
echo $(readlink -f /usr/bin/java | sed “s:bin/java::”)