Ariyan
Ariyan

Reputation: 15158

Setting "JAVA_OPTS" globally on Windows

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

Upvotes: 8

Views: 23327

Answers (1)

ring bearer
ring bearer

Reputation: 20783

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.

Upvotes: 19

Related Questions