kaankarakoc42 opened a new pull request, #20257: URL: https://github.com/apache/kafka/pull/20257
### Summary This PR fixes an issue on Windows systems where the wmic command used to detect OS architecture is deprecated and may cause failures in Kafka startup scripts. It replaces the wmic command with a check on the environment variable %PROCESSOR_ARCHITECTURE% to determine whether the OS is 32-bit or 64-bit. Additionally, this PR sets the KAFKA_OPTS environment variable to force the Java runtime to use the English (US) locale (-Duser.language=en -Duser.country=US) during Kafka startup on Windows. This ensures consistent locale behavior, which can help prevent locale-related issues in logs and error messages. **Changes** - Removed deprecated wmic command and replaced it with environment variable detection. - Added set KAFKA_OPTS=-Duser.language=en -Duser.country=US in the Windows startup batch script. - Updated comments to reflect the changes. **Motivation** - wmic is deprecated and may not be available on future Windows releases. - Using %PROCESSOR_ARCHITECTURE% is a more reliable and lightweight way to detect OS bitness. - Explicitly setting locale properties improves Kafka’s behavior on non-English or multi-lingual Windows systems. **Testing** - Confirmed Kafka launches successfully **Notes** This change only affects Kafka when started using the Windows batch scripts. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org