I am using redhat 6.5. By default JRE is installed with this OS. I want to find the rpm name of the jre installed in my machine. ie) input should be executable and the output will be the rpm name
which java
/usr/bin/java
expected output:
command to find the rpm name.
jre-1.7.0_80-fcs.x86_64
here java --version shows version 1.5. But i want to use oracle jre instead of the default one. After installing oracle jre still the default version of jres is used but i want to remove the default version of jre from OS.
Any help will be appreciated.
The solution to you problem is , after installing the oracle version of java you have to use alternatives command to point to you default java, like follows:
and select the default version there. Now check the version of java with
java --version