Tomcat启动时,窗口中文乱码问题

通过startup.bat文件启动Tomcat时,出现如下乱码

27-Mar-2020 20:39:55.098 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄦ瀯寤?            Feb 5 2020 22:26:25 UTC

27-Mar-2020 20:39:55.099 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄧ増鏈彿(锛?.5.51.0

27-Mar-2020 20:39:55.101 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
27-Mar-2020 20:39:55.101 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.鐗堟湰:               10.0
27-Mar-2020 20:39:55.101 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏋舵瀯:                  amd64
27-Mar-2020 20:39:55.101 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 鐜鍙橀噺:         E:\java\jdk1.8\jre
27-Mar-2020 20:39:55.102 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 鐗堟湰:              1.8.0_181-b13
27-Mar-2020 20:39:55.102 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.渚涘簲鍟?            Oracle Corporation

27-Mar-2020 20:39:55.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         E:\apache\apache-tomcat-8.5.51
27-Mar-2020 20:39:55.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         E:\apache\apache-tomcat-8.5.51
27-Mar-2020 20:39:55.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dja

解决办法:
找到Tomcat安装文件conf / logging.properties用记事本打开,
找到java.util.logging.ConsoleHandler.encoding = UTF-8,将UTF-8改为GBK

java.util.logging.ConsoleHandler.encoding = GBK

你可能感兴趣的:(tomcat,乱码)