I had Java 11, then decided to change to Java 8. I uninstalled 11 and installed 8.
Then have added these lines into ~/.bashrc:
export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"
export PATH=$PATH:$JAVA_HOME/bin
Executed source ~/.bashrc.
javac -version gives 8, but java -version still shows 11.
I tried to use sudo update-alternatives --config javac and set it to 8, but still...