How do I set the default locale in the JVM?

前端 未结 7 1122
半阙折子戏
半阙折子戏 2020-11-22 11:42

I want to set the default Locale for my JVM to fr_CA. What are the possible options to do this?

I know of only one option Locale.setD

7条回答
  •  耶瑟儿~
    2020-11-22 11:58

    You can set it on the command line via JVM parameters:

    java -Duser.country=CA -Duser.language=fr ... com.x.Main
    

    For further information look at Internationalization: Understanding Locale in the Java Platform - Using Locale

提交回复
热议问题