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
Windows 10Right-click on the Start button and select the Control Panel option. In the Windows Control Panel, click on Programs. Click on the Java icon to open the Java Control Panel.
JAVA_OPTS is an environment variable that you can set to pass custom settings to the Java Virtual Machine (JVM) that runs Liquibase.
Use CATALINA_OPTS rather than JAVA_OPTS since CATALINA_OPTS is only used on start whereas JAVA_OPTS is used on start and stop.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With