Java: How to change the language of java.util.logging to English?

为君一笑 提交于 2020-01-21 09:09:00

问题


I have java.util.logging to print output to a file. It works fine. However, the messages contain chinese characters which correspond to the log level and the time the messages are logged.

How can I make it print english instead of chinese characters ?

This is what the current messages look like

11月 08, 2016 8:28:03 下午 mySamples.testing.TestingFile errorFunction
資訊: Exception: 123

回答1:


Start your application by passing the language on the command-line to override the current default language of the OS.

java -Duser.language=en MyApplication


来源:https://stackoverflow.com/questions/40486841/java-how-to-change-the-language-of-java-util-logging-to-english

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!