Any idea what does -Dfile.encoding=UTF-8 in
It sets a property which defines in which encoding will Java save and read files by default. It must be set at JVM startup.
There are multiple encodings - ways to represent characters on computers. UTF-8 is one of the best to use, as it contains all special characters in many languages.
Once you don't have this property, Java might save files in a different encoding which might lead to strange characters when opening the file with text editor. You can avoid this issue by manually setting the desired encoding to your