Skip to main content

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-version and javm 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​

  1. 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
  2. Verify that javm is available

    • Linux/macOS: javm --version

    • Windows PowerShell: javm --version (the installer adds javm to PATH)

    • If Linux/macOS reports command not found, fix the current shell and retry:

      export PATH="$HOME/.local/bin:$PATH"
      javm --version

    This temporary PATH change is enough to continue; see Install for persistent setup.

  3. 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, then javm init nu | save -f ~/.local/share/javm/javm.nu and source ~/.local/share/javm/javm.nu
    • Command Prompt: generate the javm.cmd wrapper as described in Install
  4. Install and use a JDK

    • javm ls-remote 25 --distribution all
    • javm install temurin@25
    • javm use temurin@25
    • javm 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-version file (e.g. 25) in your project root, then run javm use there.
  • 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 -d for details) and javm discover refresh to 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: