How to set default language for java keytool?

五迷三道 提交于 2019-12-05 17:27:45
SnakE

In a nutshell you must pass the -Duser.language=en option to the Java machine. I know of two ways to do this:

  1. For just one invocation, specify the -J-Duser.language=en option on the keytool command line, e.g.

    keytool -J-Duser.language=en -genkey -keyalg RSA -alias mykey -validity 3652 -keystore C:\mykeystore -storepass 111111111 < data.txt
    

    See also SO: Forcing the use of english in JDK7 tools

  2. To change Java language globally, set the JAVA_TOOL_OPTIONS environment variable to have the -Duser.language=en value.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!