I'm trying to change the path of java_home to java-1.7.0 in a CentOS 7 machine which already has java-1.8.0 installed.
I uninstalled java-1.8.0, and used
yum -y install java-1.7.0
to install java 1.7. However,
which java
command still points to java-1.8. How do I find the path of java 1.7 JRE in this case in order to set java_home using a bash script?
Thank you,