FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

notes/install-java-mac.md at main · peterlin741/notes · GitHub

Latest commit

 

History

History
32 lines (25 loc) · 1.27 KB

File metadata and controls

32 lines (25 loc) · 1.27 KB

How to manage different java versions on Mac

# Init jenv
if which jenv > /dev/null; then eval "$(jenv init -)"; fi
  • To set the version, run jenv local {java_version} (for that directory) or jenv global {java_version}

    • jenv add /Library/Java/JavaVirtualMachines/{JAVA_FOLDER}/Contents/Home/
  • Use jenv versions to view available versions. You can view the Java paths in ~/.jenv/versions

  • The steps above handle setting the JAVA_HOME variable

  • Use cask to download java versions (not handled by jenv)

    • brew required xcode command line tools: xcode-select --install
    • brew tap adoptopenjdk/openjdk from devqa.io
    • brew install --cask java
    • brew install --cask adoptopenjdk11 (also adoptopenjdk8, adoptopenjdk13)

IntelliJ

  • How to set the Java version within an IntelliJ Gradle Project
    • Preferences > Build, Execution, Deployment > Build Tools > Gradle
    • Project Structure > Project Settings > Project

Back | FazBrowse Home | New Git URL