I want to call a java program and fetch it's output in stdout. I followed the suggestions in stackoverflow. But it doesn't work.
I have add the class file to my CLASSPATH. And I can execute the command in cmd correctly as follows:
In my PHP file I call this program by
exec("java Hello", $output);
print_r($output);
It yields nothing but:
Array()
What is the problem? How can I fix this?
ps: Hello is a demo program, actually the program I want to call is much more complicated which might take 2 or more seconds in my machine(i5 4G).