From 1e4b8a1a6b9ca8afd9635f90ad3116f68ee3da94 Mon Sep 17 00:00:00 2001 From: Abhi Tiwari <113602461+abhi-ksolves@users.noreply.github.com> Date: Wed, 24 Sep 2025 18:22:27 +0530 Subject: [PATCH] KAFKA-6333: java.awt.headless should not be on commandline (#20044) Reviewers: Mickael Maison --- bin/kafka-run-class.sh | 2 +- bin/windows/kafka-run-class.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh index 90b6e4e4c28..0a5ecfae04e 100755 --- a/bin/kafka-run-class.sh +++ b/bin/kafka-run-class.sh @@ -282,7 +282,7 @@ fi # JVM performance options # MaxInlineLevel=15 is the default since JDK 14 and can be removed once older JDKs are no longer supported if [ -z "$KAFKA_JVM_PERFORMANCE_OPTS" ]; then - KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -XX:MaxInlineLevel=15 -Djava.awt.headless=true" + KAFKA_JVM_PERFORMANCE_OPTS="-server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -XX:MaxInlineLevel=15" fi while [ $# -gt 0 ]; do diff --git a/bin/windows/kafka-run-class.bat b/bin/windows/kafka-run-class.bat index 9994d501700..a73ae2b26f2 100755 --- a/bin/windows/kafka-run-class.bat +++ b/bin/windows/kafka-run-class.bat @@ -177,7 +177,7 @@ IF ["%KAFKA_HEAP_OPTS%"] EQU [""] ( rem JVM performance options IF ["%KAFKA_JVM_PERFORMANCE_OPTS%"] EQU [""] ( - set KAFKA_JVM_PERFORMANCE_OPTS=-server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true + set KAFKA_JVM_PERFORMANCE_OPTS=-server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent ) IF not defined CLASSPATH (