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 OverflowGitHub
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 ·
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....
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/
Top answer 1 of 3
2
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.
2 of 3
2
For me, I discovered that jenv creates soft links for various 'versions' it controls, but it wouldn't create the soft link without the .0. So if something wants java 11, and my team somehow uses 11 as the jenv version, I wouldn't have 11... I would have 11.0
I resolved this by adding a soft link for the number I needed under: ~/Users/<my_home>/.jenv/versions
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 and a server using Java 11), install and add them to jEnv, then switch versions as needed using the commands from the previous section.
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...
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 ...