Install jkit

jkit is a single native binary. It needs no JDK to run. Linux packages need glibc 2.34 or newer: Debian 12+, Ubuntu 22.04+, Fedora, and RHEL, Rocky or Alma 9+.

Debian and Ubuntu: apt

jkit is published in the Vitrina apt repository, soapt upgrade keeps it current. Add the repository once, then install:

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://vitrina-project.dev/vitrina.asc | sudo tee /etc/apt/keyrings/vitrina.asc > /dev/null
sudo tee /etc/apt/sources.list.d/vitrina.sources > /dev/null <<'EOF'
Types: deb
URIs: https://vitrina-project.dev/apt
Suites: stable
Components: main
Architectures: amd64 arm64
Signed-By: /etc/apt/keyrings/vitrina.asc
EOF
sudo apt update
sudo apt install jkit

.deb or .rpm download

Download the package for your system from the latest release, then:

sudo apt install ./jkit_*_amd64.deb      # Debian, Ubuntu
sudo dnf install ./jkit-*.x86_64.rpm     # Fedora, RHEL, Rocky, Alma

From source

Building needs JDK 25 and, for the native binary, GraalVM 25.

git clone https://github.com/adriandeleon/jkit.git
cd jkit
./mvnw verify                                   # build and test on the JVM
GRAALVM_HOME=/path/to/graalvm-25 ./mvnw -Pnative package -DskipTests
sudo install jkit-cli/target/jkit /usr/local/bin/

Turn on the shell hook

A program can't change the shell that started it, so jkit use needs a small shell function. Add one line to your shell's startup file:

ShellAdd toLine
bash~/.bashrceval "$(jkit hook bash)"
zsh~/.zshrceval "$(jkit hook zsh)"
fish~/.config/fish/config.fishjkit hook fish | source

The hook also puts the global versions on PATH and sets JAVA_HOME,MAVEN_HOME, GRADLE_HOME and GRAALVM_HOME when you have not set them yourself.

Tab completion comes with it in bash and zsh: commands, options, tools and vendor names, sojkit install jdk@21 cor and Tab gives corretto. The .deb and .rpm packages also install it for bash on their own.

First steps

jkit search jdk
jkit install jdk@21
jkit use jdk@21 --global

Then see the command reference.

macOS and Windows packages are planned but not published yet. Until then, macOS users can build from source.