How do I get a platform-dependent new line character? by Tarik Java 7 now has a System.lineSeparator() method.