I have both OpenJDK and Oracle Java installed on my Ubuntu. If the activated java is OpenJDK, is there a way to check the version of Oracle java in bash shell
yes, you need to know the install path of the oracle one. then /path/to/there/bin/java -version. Assume that the openjdk one is your default java.
/path/to/there/bin/java -version
openjdk