I have an ubuntu VM, where i by accident installed jdk 11, but i wanted to install jdk 8, and then set the enviroment variable like this.
#in the .bashrc file if want to add the following lines
export JAVA_HOME=~/java/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
export SPTARGET=sandbox
the problem is that i did not install the jdk, i did it directly from the command line
sudo apt install default-jre
and whenever i check the version with
$ java -version
outputs:
openjdk version "11.0.3" 2019-04-16
does anybody know how i can remove this java version, and then add the java jdk environment variable manually?