Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created June 18, 2020 13:51
Show Gist options
  • Save jkeam/f85d2cd9b6cecb5494d792ebf3cda44f to your computer and use it in GitHub Desktop.
Save jkeam/f85d2cd9b6cecb5494d792ebf3cda44f to your computer and use it in GitHub Desktop.
This is how I installed OpenJDK on my Mac.
#!/bin/bash
brew tap AdoptOpenJDK/openjdk
# can install adoptopenjdk8 or adoptopenjdk11
brew cask install adoptopenjdk8
# list all installed
# /usr/libexec/java_home -V
# switch java version, use 1.8, or 11
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment