Java 设置“;爪哇“选择”;Windows上的全局

Java 设置“;爪哇“选择”;Windows上的全局,java,windows,environment-variables,Java,Windows,Environment Variables,我需要在Windows计算机上全局设置-Dfile.encoding=UTF8。 我试图在My Computer->Properties->environment Variables中设置JAVA_OPTS环境变量,也尝试通过Control Panel->JAVA->JAVA Runtime environment Settings设置JAVA_OPTS环境变量,但这些都没有效果。 如何在windows中全局设置JAVA_选项(特别是file.encodingproperty) 谢谢您是否尝试设

我需要在Windows计算机上全局设置-Dfile.encoding=UTF8。
我试图在
My Computer->Properties->environment Variables
中设置JAVA_OPTS环境变量,也尝试通过
Control Panel->JAVA->JAVA Runtime environment Settings
设置JAVA_OPTS环境变量,但这些都没有效果。
如何在windows中全局设置JAVA_选项(特别是
file.encoding
property)


谢谢

您是否尝试设置环境变量
JAVA\u工具\u选项


将此设置为
“-Dfile.encoding=UTF8”
,它应该由jvm拾取。但如果没有,您就别无选择,只能使用命令行参数。

JAVA\u工具选项
有效。谢谢这是个救命恩人。非常感谢。