I have the same problem. I solved this by edited the file /Users/[YourName]/.java-version myself. For example, I entered oracle64-1.8.0.121 as the first line in this file.

Answer from Duc Hiep Hoang on Stack Overflow
🌐
GitHub
github.com › jenv › jenv
GitHub - jenv/jenv: Manage your Java environment · GitHub
This will install the latest version of Java 8 to a special directory in macOS. Let's see which directory that is: $ ls -1 /Library/Java/JavaVirtualMachines openjdk-8.jdk openjdk.jdk · Observe the openjdk-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:
Starred by 6.6K users
Forked by 398 users
Languages   Shell 99.0% | Dockerfile 1.0%
🌐
Jenv
jenv.be
jEnv - Manage your Java environment
jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable · $ git clone https://github.com/jenv/jenv.git ~/.jenv · $ brew install jenv · $ echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile $ echo 'eval "$(jenv init -)"' >> ~/.bash_profile ·
🌐
Baeldung
baeldung.com › home › java › managing multiple jdk installations with jenv
Managing Multiple JDK Installations With jEnv | Baeldung
May 2, 2025 - Firstly, to use the new JDK with jEnv, we need to tell jEnv where to locate it. To do this, we make use of the jenv add command and specify the path to the JDK: $ jenv add /Library/Java/JavaVirtualMachines/openjdk-8...
🌐
MungingData
mungingdata.com › java › jenv-multiple-versions-java
Running Multiple Versions of Java on MacOS with jenv - MungingData
Running multiple Java versions ... blog post shows you how to get jenv setup on your computer and how to use the important commands. Install jenv with brew install jenv....
🌐
GitHub
gist.github.com › leifericf › f61c60a9ab889ed752f969e9db2009a0
Installing Java on macOS and Adding It to jEnv · GitHub
Note that, for Java 8, we must use java -version (with one -): ... See this Stack Overflow answer for more details. ... SDKMAN is another viable alternative to jEnv.
🌐
Medium
medium.com › javarevisited › manage-java-versions-with-jenv-6b8228552661
Manage Java Versions with jEnv. Master your Java Environment | by Jayson GCS | Javarevisited | Medium
September 11, 2023 - # For instance, I have existing Java installations via brew brew ls | grep 'openjdk' # Find out the path brew --cellar openjdk@17 ... Navigate to the ../Home sub-directory and add that path to jEnv. jenv add /opt/homebrew/Cellar/openjdk@17/17.0.8.1/libexec/openjdk.jdk/Contents/Home/
🌐
Medium
medium.com › @danielnenkov › multiple-jdk-versions-on-mac-os-x-with-jenv-5ea5522ddc9b
Multiple JDK versions on Mac OS X with jEnv | by Daniel Nenkov | Medium
November 9, 2017 - If I started having problems with ... opportunity to try jEnv. If you have installed Java with brew cask install java you will notice that brew installs the latest stable release of Java, which at the time of this writing is Java 9. To install Java 8 you can use:...
Find elsewhere
🌐
My Developer Journal
sunitc.dev › 2021 › 04 › 23 › how-to-run-multiple-java-version-in-your-local-environment-using-jenv
How To Run multiple Java Version in your local environment using JENV – My Developer Journal
April 23, 2021 - You can check by running command – jenv versions · We have already installed 3 versions of JDK. We will just add their installation paths to the JENV. We can do so, by running jenv add <jdk-path> command. As you can see, we first added JDK ...
🌐
GitHub
gist.github.com › tomysmile › a9a7aee85ff73454bd57e198ad90e614
How To Install Java 8 on Mac · GitHub
Type these commands to register JDKs in jEnv (replace the minor and patch versions with yours): jenv add /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/ jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/
🌐
Mehmet Baykar
mehmetbaykar.com › home › macos › how to set up jenv on macos
How to Set Up jEnv on macOS | Mehmet Baykar
December 27, 2025 - This process ensures that jEnv can locate and manage the installed Java versions. Without the symbolic link, jEnv will not be able to find the JDK when you try to add it. You can set the Java version at three levels: global, local, or shell. ... If jEnv is correctly loaded but no Java version is set, follow the steps above to add Java environments. If you need to manage multiple Java versions (e.g., for Android development with Java 8 ...
🌐
Rob Allen
akrabat.com › using-jenv-to-select-java-version-on-macos
Using jenv to select Java version on macOS – Rob Allen
December 2, 2020 - $ jenv add /Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home/ $ jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home/ $ jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/ The exact versions depend on what you have installed.
🌐
Punchplatform
doc.punchplatform.com › 6.4.5 › Contribution_Guide › Developper › Setup › Setup_Java_With_Jenv.html
Install Java using Jenv - Welcome - Punch Documentation
git clone https://github.com/jenv/jenv.git ~/.jenv echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(jenv init -)"' >> ~/.bashrc source ~/.bashrc export JAVA_INSTALL_DIR=~/opt/java mkdir -p $JAVA_INSTALL_DIR cd $JAVA_INSTALL_DIR # Here replace with appropriate version for your platform (see https://adoptopenjdk.net/archive.html?variant=openjdk8&jvmVariant=hotspot) # MINIMUM VERSION is 8u252 wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz tar -zxvf OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz rm OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz jenv add jdk8u252-b09 source ~/.bashrc jenv enable-plugin export jenv global 1.8.0.252 # use jenv versions to see the choices ·
🌐
Adam Gamboa G
blog.adamgamboa.dev › using-jenv-to-switch-jkd-versions
Using jEnv to switch JDK versions
December 24, 2021 - It might be very common to require ... Java 8, to Java 11 or Java 17, or any other version, while you are working on different projects or applications. One way to switch Java’s version is setting the JAVA_HOME env-var to the installation directory of the desire version. To help with that work jEnv is a tool ...
🌐
Atevans
atevans.com › 2019 › 04 › 26 › jenv-and-java-versioning.html
atevans - Jenv and Java Versioning
April 26, 2019 - $ brew cask install homebrew/cask-versions/adoptopenjdk8 $ jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home $ cd ~/Workspace/mapbox-java $ jenv local 1.8 $ jenv shell 1.8 # apparently 'jenv local' wasn't enough??
🌐
Bartek-blog
bartek-blog.github.io › java › 2019 › 03 › 28 › how-to-install-java.html
How to install multiple java versions | Bartek’s Cheat Sheet
March 28, 2019 - * 1.8 (set by /Users/barteksko... check your java version by calling ... sudo apt-get install software-properties-common sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer...
🌐
DEV Community
dev.to › gabethere › installing-java-on-a-mac-using-homebrew-and-jevn-12m8
Brew Install Java: Installing Java on MacOS using Homebrew and JEnv - DEV Community
August 28, 2020 - Let's ensure that we know the location ... command to add the location of this version to jenv · $ jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Cont......
🌐
Reflectoring
reflectoring.io › manage-jdks-with-jenv
Managing Multiple JDK Installations With jEnv
October 18, 2022 - Making Maven work with the local JDK defined by jEnv is easy. We just need to install the maven plugin: ... If we run mvn -version in our ~/shiny-project folder from above now, we’ll get the following output: Maven home: .../apache-maven-3.6.3 Java version: 15, vendor: AdoptOpenJDK, runtime: /home/tom/software/java/jdk-15+36 Default locale: en_AU, platform encoding: UTF-8 ...