hide JDK warnings if JDK 26 or later

This commit is contained in:
xuwei-k 2026-04-12 07:52:23 +09:00
parent 767ebec906
commit 6a5110c5a0
2 changed files with 2 additions and 2 deletions

2
sbt
View File

@ -362,7 +362,7 @@ addSbtScriptProperty () {
}
addJdkWorkaround () {
local is_25="$(expr $java_version "=" 25)"
local is_25="$(expr $java_version ">=" 25)"
if [[ "$hide_jdk_warnings" == "0" ]]; then
:
else

View File

@ -85,7 +85,7 @@ object Main:
else Memory.addDefaultMemory(javaOpts, sbtOpts, javaVer, LauncherOptions.defaultMemMb)
sbtOpts = finalSbt
if !opts.noHideJdkWarnings && javaVer == 25 then
if !opts.noHideJdkWarnings && javaVer >= 25 then
sbtOpts = sbtOpts ++ Seq(
"--sun-misc-unsafe-memory-access=allow",
"--enable-native-access=ALL-UNNAMED"