#!/usr/bin/env bash # The JDK 27 changes that are not JEPs but will still break somebody's Monday: JVM options that no # longer exist, a launch mechanism that is gone, a locale property that is ignored, new public APIs. # ./scripts/other-changes.sh -> docs/output/60-removed-options.txt, 61-behaviour-changes.txt, 62-new-api.txt set -uo pipefail source "$(dirname "$0")/env.sh" B="$ROOT/build/other"; rm -rf "$B"; mkdir -p "$B" SRC="$ROOT/other-changes/src" "$JDK27/bin/javac" --release 26 -d "$B" "$SRC/Compat.java" "$SRC/SpawnProbe.java" "$JDK27/bin/javac" --enable-preview --release 27 -d "$B" "$SRC/Check.java" "$SRC/Api27.java" 2>&1 | grep -v '^Note' || true # first two lines of the JVM's response to a launch option, and the exit code try() { local jdk="$1"; shift; local out rc; out="$("$jdk/bin/java" "$@" -version 2>&1 | grep -v -E '^(openjdk version|OpenJDK Runtime|OpenJDK 64-Bit Server VM \()' | head -2)"; rc=${PIPESTATUS[0]} [ -z "$out" ] && out="(accepted silently)"; printf '%s\n' "$out" | sed 's/^/ /'; } { echo "# JVM options that JDK 27 removed or renamed. Each runs 'java