LinuxmacOS

Where Does jenv Store Java Versions?

jenv tracks installed JDKs under ~/.jenv/versions with shims and plugins, selecting per project through .java-version files.

Last updated

jenv manages Java versions by reference rather than by installation. You install JDKs however you like (packages, archives, installers), then register each path with jenv add. The versions folder records those registrations while shims route java, javac, and friends.

Selection layers like the other *env tools: .java-version in the project beats the global file in ~/.jenv/version. The export plugin bridges the gap to JAVA_HOME, which plenty of Java tooling still demands. Enable it early and forget it.

Where jenv stores this, by platform

Linux
~/.jenv/versions

Registered JDKs, shims, plugins, and the global version file. jenv add records paths without moving JDKs, so the folders here are pointers plus shims, not full installs.

macOS
~/.jenv/versions

Same layout on macOS, where /usr/libexec/java_home and Homebrew JDKs are the usual registration sources. The export plugin keeps JAVA_HOME in sync on every switch.

Frequently asked questions

jenv lists a JDK that no longer works. What happened?

Run jenv versions to list registered JDKs and jenv version for the current pick. Registration only records a path, so a JDK you moved or deleted shows up as broken until re-added.

Why does an app ignore my jenv version?

Enable the export plugin so jenv sets JAVA_HOME on every switch. Without it, tools that read JAVA_HOME directly ignore the shimmed java and use whatever the environment says.

Notice an outdated path? Let us know.