I have an output file for a program that I wrote. It is written by FileWriter and BufferedWriter.
FileWriter errout = new FileWriter(new File("_ErrorList.txt")); BufferedWriter out = new BufferedWriter(errout);
Later I write to a file using lines similar to.
out.write("Product id:" + idin + " did not fetch any pictures.\n ");
When I just run the program in Eclipse, the output file is formatted correctly, with each message being written to a new line. However, when I export to a .jar file, it no longer works and puts each message on one line, as if "\ n" was not working.
Am I using FileWriter / BufferedWriter incorrectly or not working in a .jar file?
source share