tomcat启动出现乱码,已解决

tomcat启动出现乱码问题,我下载的是tomcat7,环境变量配置完善,启动start.bat后可以使用,但是启动start.bat弹出的命令行中文乱码


 
 
  1. NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
  2. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  3. 淇℃伅: Server version: Apache Tomcat/7.0.92
  4. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  5. 淇℃伅: Server built: Nov 9 2018 11:07:44 UTC
  6. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  7. 淇℃伅: Server number: 7.0.92.0
  8. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  9. 淇℃伅: OS Name: Windows 10
  10. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  11. 淇℃伅: OS Version: 10.0
  12. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  13. 淇℃伅: Architecture: amd64
  14. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  15. 淇℃伅: Java Home: H:\java\jdk-10.0.2
  16. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  17. 淇℃伅: JVM Version: 10.0.2+13
  18. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  19. 淇℃伅: JVM Vendor: "Oracle Corporation"
  20. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  21. 淇℃伅: CATALINA_BASE: D:\apache-tomcat-7.0.92
  22. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  23. 淇℃伅: CATALINA_HOME: D:\apache-tomcat-7.0.92
  24. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  25. 淇℃伅: Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
  26. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  27. 淇℃伅: Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
  28. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  29. 淇℃伅: Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
  30. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  31. 淇℃伅: Command line argument: -Djava.util.logging.config.file=D:\apache-tomcat-7.0.92\conf\logging.properties
  32. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  33. 淇℃伅: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  34. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  35. 淇℃伅: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
  36. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  37. 淇℃伅: Command line argument: -Dignore.endorsed.dirs=
  38. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  39. 淇℃伅: Command line argument: -Dcatalina.base=D:\apache-tomcat-7.0.92
  40. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  41. 淇℃伅: Command line argument: -Dcatalina.home=D:\apache-tomcat-7.0.92
  42. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.VersionLoggerListener log
  43. 淇℃伅: Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-7.0.92\temp
  44. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
  45. 淇℃伅: Loaded APR based Apache Tomcat Native library 1.2.18 using APR version 1.6.5.
  46. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
  47. 淇℃伅: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
  48. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.core.AprLifecycleListener initializeSSL
  49. 淇℃伅: OpenSSL successfully initialized (OpenSSL 1.1.1 11 Sep 2018)
  50. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.coyote.AbstractProtocol init
  51. 淇℃伅: Initializing ProtocolHandler ["http-apr-8080"]
  52. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.coyote.AbstractProtocol init
  53. 淇℃伅: Initializing ProtocolHandler ["ajp-apr-8009"]
  54. 12鏈?17, 2018 9:09:20 涓嬪崍 org.apache.catalina.startup.Catalina load
  55. 淇℃伅: Initialization processed in 887 ms
  56. 12鏈? 17, 2018 9: 09: 20 涓嬪崍 org.apache.catalina.core.StandardService startInternal
  57. 淇℃伅: Starting service Catalina
  58. 12鏈? 17, 2018 9: 09: 20 涓嬪崍 org.apache.catalina.core.StandardEngine startInternal
  59. 淇℃伅: Starting Servlet Engine: Apache Tomcat/ 7.0 .92
  60. 12鏈? 17, 2018 9: 09: 20 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  61. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\docs
  62. 12鏈? 17, 2018 9: 09: 20 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  63. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  64. 12鏈? 17, 2018 9: 09: 21 涓嬪崍 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
  65. 璀﹀憡: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [ 265] milliseconds.
  66. 12鏈? 17, 2018 9: 09: 21 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  67. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\docs has finished in 881 ms
  68. 12鏈? 17, 2018 9: 09: 21 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  69. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\examples
  70. 12鏈? 17, 2018 9: 09: 21 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  71. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  72. 12鏈? 17, 2018 9: 09: 21 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  73. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\examples has finished in 658 ms
  74. 12鏈? 17, 2018 9: 09: 21 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  75. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\hello1
  76. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  77. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  78. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  79. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\hello1 has finished in 102 ms
  80. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  81. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\host-manager
  82. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  83. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  84. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  85. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\host-manager has finished in 143 ms
  86. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  87. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\manager
  88. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  89. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  90. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  91. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\manager has finished in 89 ms
  92. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  93. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\ROOT
  94. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  95. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  96. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  97. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\ROOT has finished in 102 ms
  98. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  99. 淇℃伅: Deploying web application directory D:\apache-tomcat -7.0 .92\webapps\w-wang
  100. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.TldConfig execute
  101. 淇℃伅: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  102. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.HostConfig deployDirectory
  103. 淇℃伅: Deployment of web application directory D:\apache-tomcat -7.0 .92\webapps\w-wang has finished in 114 ms
  104. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.coyote.AbstractProtocol start
  105. 淇℃伅: Starting ProtocolHandler [ "http-apr-8080"]
  106. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.coyote.AbstractProtocol start
  107. 淇℃伅: Starting ProtocolHandler [ "ajp-apr-8009"]
  108. 12鏈? 17, 2018 9: 09: 22 涓嬪崍 org.apache.catalina.startup.Catalina start
  109. 淇℃伅: Server startup in 2284 ms

上面是命令行中出现的,可以使用,但能逼死强迫症!(⊙o⊙)…


亲测修改方法如下:

到tomcat/conf/目录下 

修改logging.properties 找到 java.util.logging.ConsoleHandler.encoding = utf-8这行 更改为 java.util.logging.ConsoleHandler.encoding = GBK

确实可用!

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值