Mojira Archive
MC-157942

Unable to start server with UTF-8 on Windows

An error occurs when the following command is executed at Windows Command Prompt.

Commands
chcp 65001
java -Dfile.encoding=UTF-8 -Dsun.err.encoding=UTF-8 -jar server.jar nogui
Log output
2019-07-29 03:38:45,163 main ERROR Unable to inject fields into builder class for plugin type class org.apache.logging.log4j.core.appender.ConsoleAppender, element Console. java.nio.charset.UnsupportedCharsetException: cp65001
...
2019-07-29 03:38:45,172 main ERROR Unable to invoke factory method in class class org.apache.logging.log4j.core.appender.ConsoleAppender for element Console. java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.ConsoleAppender
...
2019-07-29 03:38:45,226 main ERROR Null object returned for Console in Appenders.
2019-07-29 03:38:45,235 main ERROR Unable to locate appender "SysOut" for logger config "root"

This issue is not serious for most people, but I decided to report because of server quality.

Workaround

Specify the following command line argument when starting the server:

-Dsun.stdout.encoding=UTF-8

Unresolved

rasensuihei

2019-07-28, 10:28 PM

2022-08-11, 12:47 AM

2

3

Confirmed

Dedicated Server

1.14.4, 20w49a, 1.19.2

-