I need to set -Dfile.encoding=UTF8 globally on Windows machine.
I tried to set JAVA_OPTS environment variable in My Computer -> Properties ->Environment Variables
and also via Control Panel->Java->Java Runtime Environment Settings
but these had no effect.
How can I set JAVA_OPTS (and specially file.encoding
property) globally in windows?
Thanks
Did you try setting up environment variable JAVA_TOOL_OPTIONS
?
Set this to "-Dfile.encoding=UTF8"
and it is supposed to be picked up by jvm. But if it doesn't, you are left with no choice other than to use command line parameter.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.