I am using Amazon corretto JDK and earlier had only 1.8 installed in my Mac OS, yesterday I installed Amazon corretto JDK 11 using the Mac OS package installer and after that it changed my default java version to 11.
I followed highly rated medium blog on Jenv to manage multiple version on Mac OS but still my default java version is not switching back to 1.8 and didn't get any error while following stackoverflow answer or medium post.
command using Jenv
jenv versions
system
1.8
* 1.8.0.252 (set by /Users/my user/.jenv/version) // note `*` that should tell the current version IMO
11
11.0
11.0.7
corretto64-1.8.0.252
corretto64-11.0.7
output of java -version
java --version openjdk 11.0.7 2020-04-14 LTS OpenJDK Runtime Environment Corretto-11.0.7.10.1 (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.7.10.1 (build 11.0.7+10-LTS, mixed mode)
Note: I have multiple apps which used different JDK versions and I don't want to use the alias way of managing the JDK version, I am interested in Jenv where I can set my JDK version globally(1.8 in my case) and locally(based on the JDK particular app uses).