본문 바로가기

Language/자바

JVM Locale

http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm 참조


The default locale of your application is determined in three ways. First, unless you have explicitly changed the default, the Locale.getDefault() method returns the locale that was initially determined by the Java Virtual Machine (JVM) when it first loaded. That is, the JVM determines the default locale from the host environment. The host environment's locale is determined by the host operating system and the user preferences established on that system.

Second, on some Java runtime implementations, the application user can override the host's default locale by providing this information on the command line by setting the user.languageuser.country, and user.variant system properties.

Third, your application can call the Locale.setDefault(Locale) method. The setDefault(Locale aLocale) method lets your application set a systemwide (actually VM-wide) resource. After you set the default locale with this method, subsequent calls to Locale.getDefault() will return the newly set locale.

'Language > 자바' 카테고리의 다른 글

isInstanceOf vs isAssignable  (0) 2016.09.08
Java Stream / marshal, unmarshal / serializable / NIO  (0) 2016.09.05
2Phase Commit  (0) 2016.08.17
BCI  (0) 2016.06.09
BTrace  (0) 2016.06.09