fjm is a fast, lightweight CLI tool to install and manage JDKs and their certificates across multiple shell sessions.
Download the latest binary for your platform from the GitHub Releases page.
curl -Lo fjm https://github.com/your-username/fjm/releases/latest/download/fjm_Linux_x86_64.tar.gz
tar -xzf fjm_Linux_x86_64.tar.gz
chmod +x fjm
mv fjm /usr/local/bin/Download the .zip from the releases page, extract it, and add the binary to your PATH.
Add the following to your shell profile so fjm can manage your Java environment per session.
eval "$(fjm env)"eval "$(fjm env)"fjm env | Invoke-Expression# Install a JDK
fjm install 21
# Switch to a specific version
fjm use 21
# Check the current version
java -versionDownloads and installs the latest JDK for the given major version from Adoptium.
fjm install 21
fjm install 17Switches the active JDK for the current shell session.
fjm use 21Adds a certificate to the active JDK's truststore.
fjm cert add <domain-url> --name <alias>