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
you should follow bellow two commands
In their show the all already installed Java versions like below
2.gedit ~/.bashrc
`export JAVA_HOME=/path/to/jdk/folder
export PATH=$PATH:$JAVA_HOME/bin`
add to bash