How to change locale in a Windows terminal?

Weijun Wang at
Wed Aug 10 02:52:25 UTC 2016

Hi Kris

Yes, it works, with -Duser.language.

Unfortunately, I am looking for a way to change the default/initial 
locale, and then using these system properties to change the effective 
locale again. :-)

Precisely, there is a test using grep to match warning messages and on a 
Chinese Windows it cannot find the hardcoded English text. Since I only 
have Windows in English, I need to a way to mimic a Chinese Windows 
first, and then see if adding -Duser.language=en to 
the test will make it work again.

On a Mac it's much easier.


On 8/10/2016 9:33, Krystal Mok wrote:
> Hi Max,
> Does setting work for you? (I don't remember what the
> correct name for China should be, but setting that to US forces java to
> print the help message in English)
> - Kris
> On Tue, Aug 9, 2016 at 6:25 PM, Weijun Wang < at
> < at>> wrote:
>     My Windows 10 is English, but I want the java command to show
>     Chinese help screen temporarily.
>     I've tried "set LANG", chcp, "control intl.cpl,, /f:" but none works.
>     Thanks
>     Max

More information about the core-libs-dev mailing list