[Java] Mac Java Home Directory

less than 1 minute read

I forget the location of my home directory every time I upgrade Java on my Mac.

Looking at the environment variables in .bashrc, I’m convinced that it was, but I can’t remember.

export JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-14.jdk/Contents/Home"

By the way, I also leave the Java installation command with brew.

brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk14


Tags: ,