I have a Java Application running on Linux machine, it is generating a file in which each record is separated by new line,
This file will be used by an application running on Unix SunOS system and my code below does not generate proper file . I mean following code generates a file in which each line end with ^M charater when I open it with vi editor in Unix system
bw = new BufferedWriter(new FileWriter(file));
bw.write("\n");
Which character I have to write in order to see the file properly in Unix system.