如何更改Java中的默认语言环境设置以使它们保持一致? [英] How do I change the default locale settings in Java to make them consistent?

查看:94
本文介绍了如何更改Java中的默认语言环境设置以使它们保持一致?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一组命令行参数,这些参数允许我强制为java应用程序设置一组特定的语言环境设置。

I'm looking for a set of command line parameters that will allow me to force a specific set of locale settings for a java application.

假设我无法修改应用程序,所以我必须使用 java -Dmy.prop =value来设置属性

Let's say that I'm not able to modify the application, so I have to set the properties using java -Dmy.prop="value".

我正在寻找更改日期/时间格式以使其符合ISO-8601(军事时间),但我无法为此找到合适的属性。

I'm looking specially to change the date/time format to make it ISO-8601 compliant (military time), but I was not able to find the proper properties for this.

推荐答案

很好,我对同样的事感兴趣,但到目前为止我有只有部分解决方案

Nice, i was interested about the same thing but so far I have only a partial solution:

user.timezone=UTC
user.country=CA
user.variant=
user.language=en
file.encoding=utf8

您可以使用加拿大,因为它是使用ISO 8601格式的国家之一。

You can use Canada, because it one of the countries using the ISO 8601 format.

这篇关于如何更改Java中的默认语言环境设置以使它们保持一致?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆