====== Avoid escaping characters in java Properties class ====== After calling the **store** method, all the special characters from the key values will be escaped by \ \\ Ex: instead of :test= we'll have in the properties file \:test\= \\ To avoid this we need to override the store method: Properties properties = new Properties(){ @Override public void store(OutputStream out, String comments) throws IOException { BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(out, System.getProperty("file.encoding"))); synchronized (this) { for (Enumeration e = keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); String val = (String) get(key); bufferedWriter.write(key + "=" + val); bufferedWriter.newLine(); } } bufferedWriter.flush(); } };