Skip to content

Commit 938b142

Browse files
committed
Drop Java 17-20 JVM flag incompatible with Java 21
Remove --sun-misc-unsafe-memory-access=allow from both .mvn/jvm.config and surefire argLine; the option was removed in Java 21 and causes a fatal JVM startup error on that toolchain.
1 parent ddfa62e commit 938b142

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

.mvn/jvm.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
--sun-misc-unsafe-memory-access=allow
21
--enable-native-access=ALL-UNNAMED

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
<artifactId>maven-surefire-plugin</artifactId>
277277
<version>3.5.5</version>
278278
<configuration>
279-
<argLine>--sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED</argLine>
279+
<argLine>--enable-native-access=ALL-UNNAMED</argLine>
280280
</configuration>
281281
</plugin>
282282
</plugins>

0 commit comments

Comments
 (0)