Termhint Get Termhint

Guide

A Java version manager for Mac that switches the JDK per folder

Last checked 17 November 2026

In short: Termhint's runtime manager installs Eclipse Temurin JDKs from Adoptium, refuses any archive whose checksum or Adoptium signature does not match, and switches java and JAVA_HOME when you change folders, from .java-version or .tool-versions. SDKMAN! offers many more JDK builds and other JVM tools; jEnv switches JDKs you installed yourself; Homebrew's openjdk gives you one JDK per formula.

Install and switch a JDK

termhint runtime list-remote java         # Temurin builds for this Mac
termhint runtime install java 21          # the newest 21.x
termhint runtime use java 17              # pin here: writes .tool-versions in this folder
termhint runtime use -g java 21           # the default outside pinned folders
termhint runtime current                  # what this folder asks for, and whether it is installed
termhint runtime exec java@17 -- ./gradlew build   # for scripts and cron, where no prompt runs

The same commands are in Settings → Runtimes. Termhint is a menu-bar app for macOS 14 or later on Apple silicon.

Which JDK it downloads, and how it is checked

Other vendors (Zulu, Corretto, GraalVM, Liberica) are not offered.

Switching the JDK per folder

When you change folders, zsh (and bash, if you set it up there) picks the Java version without starting a process. The first answer wins:

  1. TERMHINT_JAVA_VERSION in the environment.
  2. Walking up from the folder: the nearest .tool-versions line for java, or a .java-version file. In one folder, .tool-versions comes first.
  3. Your default in ~/.config/termhint/tool-versions.

Version files are read as data, never run. system means "leave Java alone". .sdkmanrc is not read; put the version in .java-version or .tool-versions instead.

Termhint, SDKMAN!, jEnv and Homebrew compared

Installs JDKsPer-folder fileHow it switches
SDKMAN!Yes, many vendors (versions like 21.0.4-tem), plus Gradle, Maven, Scala and other SDKs.sdkmanrcsdk env, or automatically on cd with sdkman_auto_env=true
jEnvNo: "Use your platform appropriate package manager to install java".java-versionShims; JAVA_HOME with its export plugin
Homebrew openjdkYes, OpenJDK built by Homebrew; openjdk is the newest, versioned formulae such as openjdk@21 for othersNoneYou change PATH, or link the JDK into /Library/Java/JavaVirtualMachines (its caveat)
TermhintTemurin only, signature checked.java-version, .tool-versionsThe shell integration on each prompt; sets JAVA_HOME

SDKMAN! from its usage page; jEnv from its README; Homebrew from the openjdk formula page.

Which Java version manager is best for you

Moving from SDKMAN! or jEnv

termhint runtime migrate --dry-run sdkman jenv   # what would move
termhint runtime migrate sdkman                  # install the same Java versions, set the default, turn SDKMAN! off

Migrate installs the manager's Java versions with Termhint, makes its default the global one and turns its lines in ~/.zshrc and the other shell files off (backed up first). Two builds of one version, such as SDKMAN!'s 21.0.1-tem and 21.0.1-zulu, install once, as Temurin. SDKMAN!'s other candidates (Gradle, Maven, …) are listed but not moved. --undo turns the manager back on. See also asdf and mise for .tool-versions.

Download for Mac All runtimes