okay, I would try Azul open JDKs on my current MBP. Would run and validate if everything works fine. ( Maven & Jenkins Integration and java selenium test results )Theoretically you now need to purchase a license to use the Oracle JDKs. It's probably only enforced for large business use though. It doesn't look like the Azul JDKs have an installer but I could be wrong. They are easy enough to install without one. Just copy the JDK folder to /Library/Java/JavaVirtualMachines.
So for the Azul JDK11, you unzip zulu11.43.1007-ca-jdk11.0.9.1-macos_aarch64.zip and copy the zulu-11.jdk folder to /Library/Java/JavaVirtualMachines/
You can have multiple JDKs in the JavaVirtualMachines directory but the system will pick up the latest version. If you want to use an older one there is a command line tool that selects between whatever is installed.
To see what JDK is going to be used by default:
/usr/libexec/java_home
To see all of the JDKs available:
/usr/libexec/java_home -V
To set an older JDK:
export JAVA_HOME=`/usr/libexec/java_home -v 11`
# the quotes are backticks meaning execute in place
# the -v 11 chooses JDK11
# the change is temporary for the current session unless you change your .zshrc or .bashrc
Yes I handled multiple Java versions in mac earlier also. Setting up JAVA HOME and changing the Path using vi /.bash_profile
Thanks?