Frage

I'm on Windows 7. The system locale is zh_CN and there's no way to change the OS's locale. When install java, it detected the system locale and therefore java and javac will, supposedly print its output in localized language (Chinese in this case). I don't want this behaviour but there's no way to change it.

However, it doesn't work. I tried Cygwin, git bash and Win CMD, all print just question marks. See below sample output (from Cygwin): enter image description here

Anyone has any idea how to make it output English? Any help is much appreciated!

War es hilfreich?

Lösung

I believe you can do this with this command:

java -Duser.language=en -Duser.country=US ...

Andere Tipps

I compared your and my output of javac and saw that in your case the text is much shorter. So I believe that your javac prints messages in Chinese that is not supported by your terminal. So, you should either teach your terminal Chinese or re-install JDK and choose English as a current interface language (if it is possible) or probably download English version of JDK.

See the following discussion. Try their recommendations how to turn command prompt to be UTF8-compliant.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top