I have PHP that I am running with ajax. What I want to happen is the php executes a java program returns the output of said java program. Right now in my PHP file, as a test I am trying
exec("java -version", $output);
print_r($output);
However, this just prints to the console
Array
(
)
Also, when I add in my actual java program, it is outputting using System.out.println() if that makes a difference as to how it is read by PHP.