I am executing a.jar file from PHP through Command Line. However, if there is any error/exception, the error is not being displayed. I am using the following PHP script.
<?php
exec('java -jar D:\\ABC\\JavaApplication2\\dist\\JavaApplication2.jar', $result, $returnCode);
var_dump($result);
$count = count($result);
for($i=0; $i<$count;$i++){
print($result[$i]);
}
?>
The output for the above code is : 'array(0) { }'