How can I get all the Java versions installed on my Mac?
Is there a terminal command for this?
When I run java -version, I get th
java -version
/usr/libexec/java_home -V
lists one line per Java environment installed (and known to the /usr/bin/java command). You can still have other Java installations - like Zulu or AdoptOpenJDK - which are not registered.
/usr/bin/java