import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.Properties; public class MainClass { public static void main(String args[]) throws Exception { Properties p = new Properties(); p.load(new FileInputStream("test.txt")); p.store(new FileOutputStream("t.txt"),"no comments"); } } //File: test.txt /* foo:bar one two three=four five six seven eight nine ten */
foo=bar one= two= three=four five=six seven eight nine=ten