Skip to main content
javm

Switch Java versions without changing your system Java

Install managed JDKs, discover existing installations, and activate the version your project needs in the current shell.

Native on Linux, macOS, and Windows · Bash, Zsh, Fish, Nushell, PowerShell, and CMD

$ javm use temurin@25

$ java --version

openjdk 25.0.x ...

One tool, three common workflows

Whether you need a fresh JDK, an existing installation, or a project-specific version, javm keeps the choice explicit.

Install and switch

Download a distribution, install it under javm, and activate it in the current shell.

javm install 25
javm use 25
Switch versions

Use an existing JDK

Register a JDK already on your machine without copying or replacing it.

javm link system@25.0.1 /path/to/jdk
javm use system@25
Link a JDK

Keep projects predictable

Commit a selector in .java-version and apply the project's JDK with javm use.

.java-version: temurin@25
javm use
Choose a selector

Discover. Activate. Restore.

javm does not run a background service or rewrite the system Java. The shell integration applies the selected environment to the session that you are using.

01

Discover

javm ls

See JDKs already available locally, including managed and linked installations.

02

Activate

javm use temurin@25

Activate a version, distribution, range, alias, or .java-version selector in the current shell.

03

Restore

javm deactivate

Remove javm's session entries and restore the previous JAVA_HOME when available.

Already on this machine

Local JDKs

Find managed, linked, system, IntelliJ, Gradle, and other discovered installations.

javm lsDiscover local JDKs
Available to download

Remote catalog

Browse Java distributions and versions from the Foojay DiscoAPI before installing.

javm ls-remote 25Browse the CLI reference

Put the right Java in the right shell

Install javm, initialize your shell, and choose a JDK in a few commands.

Get started with javm