In a terminal run:    /usr/libexec/java_home -V

show all installed versions in this folder /Library/Java/JavaVirtualMachines

To exclude a JDK from being picked by default, rename it’sContents/Info.plist to Info.plist.disabled. That JDK can still be used when $JAVA_HOME points to it, or explicitly referenced in a script or configuration. It will simply be ignored by the system’s java command.

Categories: Java

Leave a Reply

Your e-mail address will not be published. Required fields are marked *