HandlerLoop should be run in othervm, as it sets the system-wide URL protocol handler factory which could inadvertently affect subsequent tests run in the same agentvm. An example of this is in the bug description: https://bugs.openjdk.java.net/browse/JDK-8221098
$ hg diff test/jdk/java/net/URL/HandlerLoop.java diff --git a/test/jdk/java/net/URL/HandlerLoop.java b/test/jdk/java/net/URL/HandlerLoop.java --- a/test/jdk/java/net/URL/HandlerLoop.java +++ b/test/jdk/java/net/URL/HandlerLoop.java @@ -32,7 +32,7 @@ * @summary Test bootstrap problem when a URLStreamHandlerFactory is loaded * by the application class loader. * @modules java.base/sun.net.www.protocol.file - * @run main HandlerLoop + * @run main/othervm HandlerLoop */ public class HandlerLoop { -Chris.