Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 18321)
+++ /trunk/build.xml	(revision 18322)
@@ -458,4 +458,5 @@
 	                    <jvmarg value="-Dfile.encoding=UTF-8"/>
 	                    <jvmarg value="-Djava.locale.providers=SPI,JRE,CLDR" if:set="isJava9" />
+	                    <jvmarg value="-Djava.security.manager=allow" if:set="isJava17" />
 	                    <jvmarg value="-javaagent:${test.dir}/lib/jmockit.jar"/>
 	                    <jvmarg value="-Djunit.jupiter.extensions.autodetection.enabled=true"/>
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 18321)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 18322)
@@ -1035,4 +1035,9 @@
         // Disable automatic POST retry after 5 minutes, see #17882 / https://bugs.openjdk.java.net/browse/JDK-6382788
         Utils.updateSystemProperty("sun.net.http.retryPost", "false");
+        if (Utils.getJavaVersion() >= 17) {
+            // Allow security manager, otherwise it raises a warning in Java 17 and throws an error with Java 18+
+            // See https://bugs.openjdk.java.net/browse/JDK-8271301 / https://bugs.openjdk.java.net/browse/JDK-8270380
+            Utils.updateSystemProperty("java.security.manager", "allow");
+        }
     }
 
