Skip to content

Commit f06b450

Browse files
authored
Block running ES 8.17 with JDK 24+. (#122517)
JDK 24+ will not work due to SecurityManager being disabled. This commit makes the error explicit instead of runtime errors in SecurityManager code.
1 parent 4bdc3f9 commit f06b450

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/ServerCli.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ public void execute(Terminal terminal, OptionSet options, Environment env, Proce
7878
return;
7979
}
8080

81+
if (Runtime.version().feature() >= 24) {
82+
throw new UserException(
83+
ExitCodes.USAGE,
84+
"Elasticsearch 8.17.x cannot run with JDK 24+, but you are running JDK " + Runtime.version()
85+
);
86+
}
87+
8188
validateConfig(options, env);
8289

8390
var secureSettingsLoader = secureSettingsLoader(env);

docs/changelog/122517.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122517
2+
summary: Block running ES 8.17 with JDK 24+
3+
area: Infra/Node Lifecycle
4+
type: bug
5+
issues: []

0 commit comments

Comments
 (0)