diff --git a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/LocalhostQuarkusApplicationManagedResource.java b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/LocalhostQuarkusApplicationManagedResource.java index 72811f133..3228d9824 100644 --- a/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/LocalhostQuarkusApplicationManagedResource.java +++ b/quarkus-test-core/src/main/java/io/quarkus/test/services/quarkus/LocalhostQuarkusApplicationManagedResource.java @@ -16,6 +16,7 @@ import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; +import org.junit.jupiter.api.condition.OS; import io.quarkus.test.bootstrap.Protocol; import io.quarkus.test.logging.FileServiceLoggingHandler; @@ -178,7 +179,8 @@ private List getPropertiesForCommand() { } return runtimeProperties.entrySet().stream() - .map(e -> "-D" + e.getKey() + "=" + getComputedValue(e.getValue())) + .map(e -> "-D" + (OS.WINDOWS.isCurrentOs() ? e.getKey().replace("\"", "\\\"") : e.getKey()) + + "=" + getComputedValue(e.getValue())) .collect(Collectors.toList()); }