Sample response: /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home PROTIP: The Java program looks for the $JAVA_HOME environment variable to obtain files: WARNING: Older versions may not contain the latest security patches. The response on my machine, after all versions of Java are installed (at time of writing): total 0ĭrwxr-xr-x 6 root wheel 192 Jul 24 11:13. NOTE: This directory is at the root for the whole machine, not a particular user’s home folder. List which versions are installed on your machine by looking at where MacOS installs programs: ls -al /Library/Java/JavaVirtualMachines/ PROTIP: “java” in the above path is a binary file. Shell scripts check if Java is available by: command -v javaĪlternately, the older form is: which java You’ll come back to this after installation. “PROTIP” mark little-know or important facts not seen in many other tutorials. Like a long tour with commentary by an experienced guide, this is a deep dive into the various editions to equip you to debug JVM installation issues. Install Jenv to manage multiple Versions of Java.