JVM property -Dfile.encoding=UTF8 or UTF-8?

后端 未结 5 905
傲寒
傲寒 2020-12-01 01:57

I would like to know what is the value of the Java Virtual Machine (JVM) property to set my file encoding to UTF-8.

Do I put -Dfile.encoding=UTF8 or

5条回答
  •  無奈伤痛
    2020-12-01 02:34

    This is not a direct answer, but very useful if you don't have access to how java starts: you can set the environment variable JAVA_TOOLS_OPTIONS to -Dfile.encoding="UTF-8" and every time the jvm starts it will pick up that option.

提交回复
热议问题