Skip to main content

Install javm

javm provides install scripts for Linux, macOS, and Windows, plus simple shell setup steps.

Quick install

Install the latest version for your system by running the following command:

curl -fsSL https://javm.dev/install.sh | bash

Install a specific version or channel:

# latest nightly build
curl -fsSL https://javm.dev/install.sh | bash -s nightly

# specific release
curl -fsSL https://javm.dev/install.sh | bash -s v0.1.0
note

The scripts auto-detect your platform/architecture and support three modes: latest (default), nightly, or an explicit tag like v0.1.0.

Verify the executable

After installation, confirm that the shell can find javm:

javm --version

Linux and macOS

The Unix installer places the executable at $HOME/.local/bin/javm and does not edit shell profiles. If the command is not found in the current shell, add the install directory for that shell and retry:

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

This export affects only the current shell. To make the directory available in future shells, add it to the appropriate profile; install.sh prints this recommendation when command -v javm cannot find the installed command.

Windows

The Windows installer places javm.exe at %LOCALAPPDATA%\Programs\javm, adds that directory to the user's PATH, and updates the current PowerShell process. It does not edit a PowerShell profile, so javm --version should work immediately in the PowerShell session that ran the installer. Other terminals that were already open may need to be restarted to receive the persisted user PATH.

PATH locates the javm executable. JAVM_HOME is separate: it controls javm's configuration, cache, and managed JDK data. By default it is $XDG_DATA_HOME/javm or ~/.local/share/javm on Linux, ~/Library/Application Support/javm on macOS, and %LOCALAPPDATA%\javm on Windows. Changing JAVM_HOME does not make the executable available on PATH.

Installation verification

Both installers verify the downloaded archive's SHA-256 checksum before extracting it. A missing checksum entry or a checksum mismatch stops the installation.

Build provenance verification is automatic in the release pipeline, but requesting verification during installation is opt-in. Set JAVM_VERIFY_ATTESTATION=1 to require an authenticated GitHub CLI (gh) and a valid attestation for felipebz/javm; any failure stops the installation.

The nightly channel is a development snapshot and always requires an authenticated gh because it is downloaded as a GitHub Actions artifact with gh run download; that requirement is independent of the provenance opt-in.

See the repository's attestation guide for the full trust model and manual verification instructions.

Upgrade

To update the executable, run the installer again using the desired mode from Quick install: latest (default), an explicit release tag, or nightly. The installer replaces the existing binary; it does not install a second copy.

  • Unix replaces $HOME/.local/bin/javm and does not edit profiles or PATH.
  • PowerShell replaces %LOCALAPPDATA%\Programs\javm, preserves the user's PATH entry, and updates the current PowerShell process. It does not edit the PowerShell profile.
  • CMD uses the persisted Windows PATH from the PowerShell installer; open a new prompt after upgrading. The installer does not create or update a javm.cmd wrapper.

Generated shell integrations and wrappers are separate from the executable and are not rewritten by an upgrade.

Uninstall javm

There is no self-uninstall command. Removing the manager is a manual cleanup with three separate parts:

  • Remove the javm executable.
  • Remove any PATH or shell-integration/profile entries that you added.
  • Remove a generated CMD wrapper if you use Command Prompt.

This is different from javm uninstall, which removes a managed JDK, and from javm deactivate, which only changes the current shell session. Removing the executable also does not remove the configuration directory or managed JDKs; remove that data separately only if you intend to delete it.

Unix

The installer does not edit shell profiles. If you added $HOME/.local/bin to PATH or added a javm init line, remove those lines from the relevant profile. If you use Nushell, also remove the generated ~/.local/share/javm/javm.nu file and its source line. Then remove the executable:

rm -f "$HOME/.local/bin/javm"

Start a new shell after removing the profile entries. Any JDKs and configuration under JAVM_HOME remain until you remove them separately.

Windows PowerShell

The executable is %LOCALAPPDATA%\Programs\javm\javm.exe. Remove it manually, then remove that directory from the User Path in Windows environment-variable settings. The installer does not edit the PowerShell profile, so remove the javm init pwsh line there only if you added it. Restart PowerShell after the cleanup.

Windows Command Prompt

If you generated the shell wrapper, delete %LOCALAPPDATA%\javm\cmd\javm.cmd and remove its wrapper directory from the User Path. Also remove %LOCALAPPDATA%\Programs\javm from the User Path, delete javm.exe from that directory, and open a new Command Prompt. javm init cmd creates the wrapper; the installer does not.


Shell setup

Set up javm in your shell with one of the integrations below. Bash, Zsh, Fish, and PowerShell evaluate output from javm init <shell>; Nushell sources a generated script; Command Prompt uses a generated javm.cmd wrapper.

Why is javm init needed?

javm is an executable, but a child process cannot permanently change the environment of the shell that started it. javm init generates the shell integration that lets use and deactivate apply PATH and JAVA_HOME changes to the current session. Installing the binary is enough to run javm; the integration is what enables session switching.

Add to ~/.bashrc (or ~/.zshrc if you use Zsh with Bash config):

eval "$(javm init bash)"

After editing a profile or PATH, restart the shell to apply the setup.

Advanced: Static Shell Integration (Audit & Performance)

Unlike tools that require opaque shims, javm generates a clear, readable shell function. You can eval it for convenience, or verify and paste it directly into your profile for maximum security and startup speed.

If you prefer to avoid dynamic evaluation on every shell startup, you can append the static integration code directly to your profile:

javm init bash >> ~/.bashrc

This way, the integration code remains static and audit-ready in your configuration file.

warning

If you update javm in the future, you might need to update this static code if the shell integration logic changes.