Consider the following test case:
import java.util.*;
import java.io.*;
public class Test {
public static void main(String[] args) throws Exception {
Properties props = System.getProperties();
try (OutputStream out = new FileOutputStream("props.xml")) {
props.storeToXML(out, "comment", "Vinnie");
}
}
}
When run it prints the following to the console:
Warning: The encoding 'Vinnie' is not supported by the Java runtime.
Warning: encoding "Vinnie" not supported, using UTF-8
It's very impolite for the JDK to print messages to the console, this should be an exception instead.