diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index 5a6f9643ceb58..c58488852dce3 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -932,7 +932,10 @@ public NativeImageInvokerInfo build() { } List monitoringOptions = new ArrayList<>(); - monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP); + if (!SystemUtils.IS_OS_WINDOWS || containerBuild) { + // --enable-monitoring=heapdump is not supported on Windows + monitoringOptions.add(NativeConfig.MonitoringOption.HEAPDUMP); + } if (nativeConfig.monitoring().isPresent()) { monitoringOptions.addAll(nativeConfig.monitoring().get()); }