I have a bit of a problem
I am running a program with many classes, with one driver to run all these classes. When I run the driver, the output prints on the console just fine, but I also need the exact output from the console to be printed to a file.
However, I can't seem to get the console output to print to a file. I have tried the suggestion here
By doing this
import java.io.FileOutputStream;
import java.io.PrintStream;
public class Compiler {
public static void main(String args[]){
try {
Parse parser = new Parse();
SemanticAnalyzer sAnalyzer = new SemanticAnalyzer();
String parserfile= parser.parsefile(args[0]);
sAnalyzer.semanticAnalysis(parserfile);
PrintStream out = new PrintStream(new FileOutputStream("output.txt"));
Syste