jmv is a minimal OpenJDK manager backed by the TUNA Adoptium mirror.
It installs JDK or JRE builds into a local JMV_HOME, switches the default runtime, and exposes activated
Java commands through shims.
After publishing release archives, install the latest binary with:
curl -fsSL https://raw.githubusercontent.com/fishandsheep/jmv/main/install.sh | shThe installer downloads the matching jmv_<os>_<arch>.tar.gz release, installs jmv to
$HOME/.local/bin, creates $HOME/.jmv, and automatically adds the required environment
variables to your shell profile (Bash, Zsh, or Fish).
Customize the install location or version:
JMV_VERSION=v0.1.0 JMV_INSTALL_DIR="$HOME/bin" sh install.sh fishandsheep/jmvSkip shell profile changes:
JMV_NO_MODIFY_PROFILE=1 sh install.sh fishandsheep/jmvDownload the release archive for your platform, then install the binary:
tar -xzf jmv_linux_amd64.tar.gz
mkdir -p "$HOME/.local/bin"
mv jmv "$HOME/.local/bin/jmv"
chmod +x "$HOME/.local/bin/jmv"Install from source with Go 1.22 or newer:
git clone git@github.com:fishandsheep/jmv.git
cd okm
go install ./cmd/jmvMake sure Go's binary directory is on your PATH:
export PATH="$(go env GOPATH)/bin:$PATH"jmv uses $JMV_HOME for installed runtimes and $JMV_HOME/shims for activated Java commands.
Bash or Zsh:
export JMV_HOME="$HOME/.jmv"
export JMV_MIRROR="https://mirrors.tuna.tsinghua.edu.cn/Adoptium"
export PATH="$HOME/.local/bin:$JMV_HOME/shims:$PATH"
rm -rf "$JMV_HOME/sessions"Fish:
set -gx JMV_HOME "$HOME/.jmv"
set -gx JMV_MIRROR "https://mirrors.tuna.tsinghua.edu.cn/Adoptium"
fish_add_path "$HOME/.local/bin"
fish_add_path "$JMV_HOME/shims"
rm -rf "$JMV_HOME/sessions"Verify the installation:
jmv list list or ls [-r|--runtime [jdk]]
install or i [-r|--runtime [jdk]] <major>
uninstall or rm [-r|--runtime [jdk]] <major>
use or u [-r|--runtime [jdk]] <major>
default or d [-r|--runtime [jdk]] <major>
current or c
version or v
help or hjdk is the default runtime. Use --runtime jre for JRE operations.
jmv default <major>— sets the persistent default. All new terminal sessions will use this version.jmv use <major>— switches the active version for the current session only. Opening a new terminal will still use the previous default.
go test ./...
go build ./cmd/jmv
go run ./cmd/jmv list
sh -n install.shFormat Go files before committing:
gofmt -w cmd internalGitHub Actions runs on every push to main and on pull requests. The workflow checks Go formatting,
validates install.sh syntax, runs go test ./..., and builds the CLI with go build ./cmd/jmv.