what happend is then you install java version from interllj it will installed what but it will not make it accesble for terninal to use it
for using this you can do this thing.
- Go to intellij open project strucutre and check for jdk
- open that and get the path from it
- copy that path and do like this
export JAVA_HOME=/home/approximator/.jdks/corretto-1.8.0_422
export PATH=$JAVA_HOME/bin:$PATH
by doing this your java version which is intalled from intellij will be accessible from terminal
java -version