I am developing a website where users can upload java and C++ programs. After a program is uploaded, the website invokes other Java program (Also I am developing it) that compiles, runs and tests the compiled programs correctness. Now I am at the first step which is compiling and running the submitted programs by creating a process which runs the CMD and it works fine. However, the problem is that the output is printed on the console... I want the output (result) to be returned to the program I am developing. Is there a way for the programs results to be communicated?
Thanks for your help guys!