To clarify, I'm trying to write a program that grades if a program is run correctly. When a .java file is in the same directory, it runs the file and captures the output to a String so it can check if it is the right answer.
The files that are entered will grab data from a text file, manipulate it, and out.print(); so the program needs to be able to capture the output to see if the program submitted works and its answers match a database of answers.