The four Macs use Oracle JDK 26.0.2.1 as their active system Java for the current Minecraft server work. The laptop also retains:
- Oracle JDK 25 for projects that target Java 25.
- Eclipse Temurin 21 and 17 for older projects.
Do not remove an older JDK until the projects that need it have been checked. A Minecraft/server version and a project’s Java toolchain are separate decisions.
Download the macOS ARM64 Compressed Archive for the required Oracle JDK from Oracle Java downloads.
Unpack the archive.
Inspect the directory name before moving it. It should be a JDK bundle such as
jdk-26.0.2.1.jdk.Move the bundle into
/Library/Java/JavaVirtualMachines/. macOS will ask for administrator authentication:sudo mv jdk-26.0.2.1.jdk /Library/Java/JavaVirtualMachines/
If a bundle with the same version already exists, stop and inspect it first. Do not overwrite it casually.
Verify the installation:
/usr/libexec/java_home -V /usr/libexec/java_home -v 26.0.2.1 java -version
The active shell selection can be set for the current terminal with:
export JAVA_HOME=$(/usr/libexec/java_home -v 26.0.2.1)export PATH="$JAVA_HOME/bin:$PATH"Put that in .zshrc only if the machine should always default to that JDK. Otherwise use it per project or per command.
Homebrew’s openjdk is a separate distribution. It may be installed as a dependency of Homebrew-managed Gradle or Maven even when Oracle JDK is the default java command. Do not interpret brew list --formula alone as proof of which Java Gradle or Maven is using.
Check each tool directly:
java -version
gradle --version
mvn -versionGradle daemons can retain a JVM selected earlier. After changing JAVA_HOME, stop old daemons and start a new build if the runtime matters:
gradle --stop
gradle --versionFor reproducible builds, prefer a Gradle or Maven toolchain declaration in the project. A project targeting Java 17, 21, or 25 may require that exact compiler even when Java 26 is installed globally.
Search project configuration before removing a JDK:
rg -n --hidden --glob '!.git' \
'JavaLanguageVersion|sourceCompatibility|targetCompatibility|maven.compiler|<release>|<maven.compiler' \
~/ProjectsAlso inspect Gradle wrapper versions, Maven compiler settings, CI workflows, Dockerfiles, and README instructions. A successful build with Java 26 does not prove that Java 17 or 21 is unnecessary.
For a repeatable read-only report of installed JVMs, Gradle/Maven runtimes, and project declarations:
bash java/inventory.sh ~/Projects ~/Projects/CodexThe report is intended for local comparison and should not be committed if its project paths or host details are private.