@ -173,42 +173,36 @@ Our goal is to have both the latest version of Java and JDK 8 installed at the s
@@ -173,42 +173,36 @@ Our goal is to have both the latest version of Java and JDK 8 installed at the s
We'll resume where we left off with Java 11.0.2 installed. Let's [install Java 8](https://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac) now:
```bash
brew tap caskroom/versions
brew cask install java8
brew cask install adoptopenjdk8
brew cask install caskroom/versions/adoptopenjdk8
```
This will install the latest version of Java 8 to a special directory in macOS. Let's see which directory that is:
```bash
$ ls -1 /Library/Java/JavaVirtualMachines
jdk1.8.0_202.jdk
adoptopenjdk-8.jdk
openjdk-11.0.2.jdk
```
Observe the `jdk1.8.0_202.jdk` directory. **Your exact version may vary**. We cannot retrieve this using `/usr/libexec/java_home`, unfortunately. We'll add the Java home directory using `jenv` so that it shows up in our `jenv versions` command:
Observe the `adoptopenjdk-8.jdk` directory. **Your exact version may vary**. We cannot retrieve this using `/usr/libexec/java_home`, unfortunately. We'll add the Java home directory using `jenv` so that it shows up in our `jenv versions` command: