diff --git a/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java b/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java index 8e949cfb3a219..6b8185889ad5c 100644 --- a/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java +++ b/test/jdk/tools/jlink/runtimeImage/SystemModulesTest2.java @@ -81,6 +81,9 @@ void runTest(Helper helper, boolean isLinkableRuntime) throws Exception { .validatingModule("java.base") .addExtraOption("--disable-plugin") .addExtraOption("system-modules"); + if (isLinkableRuntime) { + builder.setLinkableRuntime(); + } Path runtimeImageLinkTarget = createJavaImageRuntimeLink(builder.build()); JImageValidator.validate(runtimeImageLinkTarget.resolve("lib").resolve("modules"), Collections.emptyList(),