A simple way is to configure an environment variable to add an option to JAVA_TOOL_OPTIONS.
For example:
Bash
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"On Windows, you can add an environment variable with the key JAVA_TOOL_OPTIONS and the value "-Dfile.encoding=UTF8".
On *nix, you can write it in a config file such as
Bash
export JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS" -Dfile.encoding=UTF8 "
sbt compile runOr you can set it at startup like this:
Bash
env JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS" -Dfile.encoding=UTF8 " sbt compile runThe difference between the two is that the former keeps the JAVA_TOOL_OPTIONS environment variable for the current session. You can write the "export xxx" line directly in a config file such as ~/.bash_profile, ~/.bashrc, etc., so it runs each time the shell starts.
The latter only uses the environment variable for the current command.
Comments
No comments yet — be the first to write one.