7

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

RYN
  • 13,462
  • 29
  • 105
  • 163

1 Answers1

17

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.

ring bearer
  • 18,848
  • 7
  • 53
  • 68