If you are running Linux, you can investigate the command alternatives
if your distribution uses it. Alternatives to java (I think available by typing alternatives java
but check the man page for details) will list all installed JREs and indicate which one is the current system default value. It also makes it easy to switch between different versions.
source
share