The most hilarious issue with -Dfile.encoding is that if it set to, for example, UTF-8, then it is literally impossible to open files with names encoded in, say, ISO-8859-1, which can happen on a Linux system where users use different LC_CTYPE.<p>You can do a &quot;dir.listFiles()&quot; and iterate it, and find that some of the entries are impossible to open because there is no way to represent the ISO-8859-1 bytes that make up the filename in a String object, and therefore no way to give the correct file name to the java io classes for opening.