How to set LOCALE in Windows console

2019-08-05 06:42发布

问题:

I need to set locale for a single console. I want to build Apache Wicket framework (Maven-based build), but it fails on test which relies on en_US locale. I don't want to skip tests. I don't want to skip the particular failing tests.

Is it possible? Or is changing the system-wide locale the only way?

Thanks

回答1:

Nothing Wicket specific and I have not done this myself. But, a little bit of google led me to this: Re: maven-surefire-plugin and default locale which again leads to Surefire Plugin Using System Properties.

Hope that helps



回答2:

Searching for this, showed up this link, which talks about creating an xml file and invoking it from a batch file as described in this link.