Getting Started
Getting Started
javm is a fast, cross-platform Java version manager focused on a frictionless install and switch workflow for JDKs on Linux, macOS, and Windows.
- Install and switch between multiple JDK distributions using semantic version ranges
- Per‑project JDK via
.java-versionandjavm use - Remote discovery (DiscoAPI integration)
- Local discovery of JDKs installed by the system, IntelliJ, Gradle, jabba, and more
- Clean removal and safe environment changes scoped to your shell
Why should I use javm?
-
Native support for Windows, Linux, and macOS
No Bash emulation layers. Works out of the box. -
Fast and script-friendly
Install and use JDKs in CI or local shells without global state or side effects. -
Reproducible environments
Pin exact JDK versions. Build predictable and portable setups. -
Zero runtime dependencies
The core is a single static binary. No JVM or other SDK required to run it.
Quick Start
-
Install javm — see the Install guide for platform-specific instructions, checksum verification, and provenance options. Quick path:
- Linux/macOS:
curl -fsSL https://javm.dev/install.sh | bash - Windows:
irm https://javm.dev/install.ps1 | iex
- Linux/macOS:
-
Verify that javm is available
-
Linux/macOS:
javm --version -
Windows PowerShell:
javm --version(the installer adds javm toPATH) -
If Linux/macOS reports
command not found, fix the current shell and retry:export PATH="$HOME/.local/bin:$PATH"javm --version
This temporary
PATHchange is enough to continue; see Install for persistent setup. -
-
Initialize your shell — see Shell setup for all supported shells. Quick path:
- Bash/Zsh:
eval "$(javm init bash)" - Fish:
javm init fish | source - PowerShell:
iex "$(javm init pwsh)" - Nushell: run
mkdir ~/.local/share/javm, thenjavm init nu | save -f ~/.local/share/javm/javm.nuandsource ~/.local/share/javm/javm.nu - Command Prompt: generate the
javm.cmdwrapper as described in Install
- Bash/Zsh:
-
Install and use a JDK
javm ls-remote 25 --distribution alljavm install temurin@25javm use temurin@25javm current
Next steps
- Default JDK for new shells:
javm default temurin@25— new shells will automatically use it. - End the current activation:
javm deactivate— undo the session change without removing the JDK. - Per-project JDK: create a
.java-versionfile (e.g.25) in your project root, then runjavm usethere. - Register an existing system JDK:
javm link system@1.8.72 /path/to/jdk— javm registers the external installation without copying it. - Discover local JDKs:
javm ls(use-dfor details) andjavm discover refreshto update the cache.
Current Status
javm is in active development and is not yet considered stable for production use.
Expect the CLI and config behavior to evolve as features mature.
Explore more:
- How-to Guide — common tasks and recipes
- Reference — commands, flags, selectors, and configuration
- Install javm — detailed setup, verification, and shell integration
- Releases & Verification — stable releases, nightly builds, checksums, and provenance