Forcing the use of english in JDK7 tools

╄→гoц情女王★ 提交于 2019-12-18 05:54:29

问题


I just installed JDK7 on a german Windows machine and the first thing I noticed is that unlike JDK6 it takes after the OS and some messages (e.g., the help messages from the tools but not error messages from the compiler) are in german. How can I force it to use english everywhere? AFAIK the installer isn't language-specific and all the messages during installation were in english.


回答1:


You mean javac? Try setting -J-Duser.language=en argument. See this post: Passing "-J-Duser.language" into javac through ant to ensure compilation errors are reported in the correct language




回答2:


You can set default java options with the environment variable JAVA_TOOL_OPTIONS.

So, to change the language, set it to -Duser.language=en

Source



来源:https://stackoverflow.com/questions/6217297/forcing-the-use-of-english-in-jdk7-tools

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