How to change java version on the fly (in MacOS)
December 30, 2022•151 words
First, we need to install JEnv, we can do it through:
brew install jenv
In some cases, the user folders are not created during installation, we can make sure they are created:
mkdir ~/.jenv
mkdir ~/.jenv/versions
Now, we check which versions of Java are installed:
jenv versions
How to install older versions, like Java 8
We enable the cask-versions of Homebrew, and we can access some older versions (in this case, Java 8):
brew tap homebrew/cask-versions
brew install --cask graalvm/tap/graalv...
Read post